diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-21 05:32:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-21 05:32:08 +0000 |
commit | d7d68307929d7cc001dc6833f9da17280b9f0150 (patch) | |
tree | 3c7fc57e07938b7d6fab2a73d1d0cbdd299d91c8 | |
parent | cc3d8eeb4bc5e64d9946ccf44c730e3bf5710f9a (diff) | |
download | ruby-d7d68307929d7cc001dc6833f9da17280b9f0150.tar.gz ruby-d7d68307929d7cc001dc6833f9da17280b9f0150.tar.xz ruby-d7d68307929d7cc001dc6833f9da17280b9f0150.zip |
* parse.y (debug_lines): calls rb_intern() once.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | parse.y | 6 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Wed Jan 21 14:32:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * parse.y (debug_lines): calls rb_intern() once. + Wed Jan 21 13:58:17 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * include/ruby/io.h (FMODE_EOF): EOF flag on TTY. @@ -4939,8 +4939,10 @@ VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always); static VALUE debug_lines(const char *f) { - if (rb_const_defined_at(rb_cObject, rb_intern("SCRIPT_LINES__"))) { - VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__")); + ID script_lines; + CONST_ID(script_lines, "SCRIPT_LINES__"); + if (rb_const_defined_at(rb_cObject, script_lines)) { + VALUE hash = rb_const_get_at(rb_cObject, script_lines); if (TYPE(hash) == T_HASH) { VALUE fname = rb_str_new2(f); VALUE lines = rb_ary_new(); |