summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 09:25:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 09:25:32 +0000
commit5a647a3f5fd011f8558c7f9e90cd65e70e73eb40 (patch)
tree294dcb47e83e5480b1fa992aba8a4b4025c8a626 /string.c
parent250dd0702111d5c2086f007b1b31ecc1e36ade40 (diff)
* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.
* *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/string.c b/string.c
index 68a4c55990..ef54b7e459 100644
--- a/string.c
+++ b/string.c
@@ -2632,7 +2632,7 @@ rb_str_upto(int argc, VALUE *argv, VALUE beg)
rb_scan_args(argc, argv, "11", &end, &exclusive);
excl = RTEST(exclusive);
- succ = rb_intern("succ");
+ CONST_ID(succ, "succ");
StringValue(end);
enc = rb_enc_check(beg, end);
if (RSTRING_LEN(beg) == 1 && RSTRING_LEN(end) == 1 &&
@@ -6526,6 +6526,8 @@ rb_to_id(VALUE name)
void
Init_String(void)
{
+#undef rb_intern
+
rb_cString = rb_define_class("String", rb_cObject);
rb_include_module(rb_cString, rb_mComparable);
rb_define_alloc_func(rb_cString, str_alloc);