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 | a37463ef14409c81422b3c3d6c35a0dbd21f51b7 (patch) | |
| tree | 294dcb47e83e5480b1fa992aba8a4b4025c8a626 /io.c | |
| parent | 32a51c5c95dde9e78161cccc9e75303a5523540b (diff) | |
| download | ruby-a37463ef14409c81422b3c3d6c35a0dbd21f51b7.tar.gz ruby-a37463ef14409c81422b3c3d6c35a0dbd21f51b7.tar.xz ruby-a37463ef14409c81422b3c3d6c35a0dbd21f51b7.zip | |
* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.
* *.c: no cache in init functions.
git-svn-id: http://svn.ruby-lang.org/repos/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> |
