summaryrefslogtreecommitdiff
path: root/enum.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 /enum.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 'enum.c')
-rw-r--r--enum.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/enum.c b/enum.c
index 7a7f180161..e4d4ee5969 100644
--- a/enum.c
+++ b/enum.c
@@ -1566,7 +1566,7 @@ enum_zip(int argc, VALUE *argv, VALUE obj)
}
}
if (!allary) {
- conv = rb_intern("to_enum");
+ CONST_ID(conv, "to_enum");
for (i=0; i<argc; i++) {
argv[i] = rb_funcall(argv[i], conv, 1, ID2SYM(id_each));
}
@@ -1800,6 +1800,8 @@ enum_cycle(int argc, VALUE *argv, VALUE obj)
void
Init_Enumerable(void)
{
+#undef rb_intern
+
rb_mEnumerable = rb_define_module("Enumerable");
rb_define_method(rb_mEnumerable, "to_a", enum_to_a, -1);