summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/string.c b/string.c
index 42666eefab..2b6295cfbc 100644
--- a/string.c
+++ b/string.c
@@ -2423,6 +2423,8 @@ Init_String()
rb_define_method(cString, "~", str_match2, 0);
rb_define_method(cString, "succ", str_succ, 0);
rb_define_method(cString, "succ!", str_succ_bang, 0);
+ rb_define_method(cString, "next", str_succ, 0);
+ rb_define_method(cString, "next!", str_succ_bang, 0);
rb_define_method(cString, "upto", str_upto, 1);
rb_define_method(cString, "index", str_index_method, -1);
rb_define_method(cString, "rindex", str_rindex, -1);
@@ -2510,4 +2512,7 @@ Init_String()
rb_define_global_function("split", f_split, -1);
pr_str = rb_intern("to_s");
+
+ /* turn on premitive flag for the class */
+ FL_SET(cString, FL_PRIMITIVE);
}