diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-09 09:25:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-09 09:25:32 +0000 |
commit | 5a647a3f5fd011f8558c7f9e90cd65e70e73eb40 (patch) | |
tree | 294dcb47e83e5480b1fa992aba8a4b4025c8a626 /io.c | |
parent | 250dd0702111d5c2086f007b1b31ecc1e36ade40 (diff) | |
download | ruby-5a647a3f5fd011f8558c7f9e90cd65e70e73eb40.tar.gz |
* 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 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -4231,7 +4231,7 @@ rb_f_open(int argc, VALUE *argv) int redirect = Qfalse; if (argc >= 1) { - to_open = rb_intern("to_open"); + CONST_ID(to_open, "to_open"); if (rb_respond_to(argv[0], to_open)) { redirect = Qtrue; } @@ -6178,11 +6178,11 @@ open_key_args(int argc, VALUE *argv, struct foreach_arg *arg) if (!encoding) { ID id; - id = rb_intern("encoding"); + CONST_ID(id, "encoding"); encoding = ID2SYM(id); - id = rb_intern("mode"); + CONST_ID(id, "mode"); mode = ID2SYM(id); - id = rb_intern("open_args"); + CONST_ID(id, "open_args"); open_args = ID2SYM(id); } v = rb_hash_aref(opt, open_args); @@ -7484,6 +7484,8 @@ rb_get_argv(void) void Init_IO(void) { +#undef rb_intern + VALUE rb_cARGF; #ifdef __CYGWIN__ #include <sys/cygwin.h> |