summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-05 06:37:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-05 06:37:50 +0000
commitf70ffbee2120cbbb8c6b0a15dfc693a69ac0d7d4 (patch)
tree2070b335aaddd33fd915c14557c82ba06ac86df9 /string.c
parent369124b0ec6aa0d58ea628339713444c559bfa5f (diff)
block arg etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 42666eefab1..2b6295cfbc2 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);
}