summaryrefslogtreecommitdiffstats
path: root/ext/ripper/tools
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-31 04:42:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-31 04:42:42 +0000
commitd0eacae0a6a6b122c6f2a56f5c440d79ba23f93f (patch)
tree3b86ce7d03415f80d6524bf874299e21e48501ae /ext/ripper/tools
parent863ceb9634edfc1bee8caa768e70dfc9b009c36b (diff)
downloadruby-d0eacae0a6a6b122c6f2a56f5c440d79ba23f93f.tar.gz
ruby-d0eacae0a6a6b122c6f2a56f5c440d79ba23f93f.tar.xz
ruby-d0eacae0a6a6b122c6f2a56f5c440d79ba23f93f.zip
* ext/ripper/eventids2.c (ripper_init_eventids2): use rb_intern_const.
* ext/ripper/tools/generate.rb (generate_eventids1): ditto. * ext/ripper/tools/generate.rb (generate_eventids2_table): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/ripper/tools')
-rwxr-xr-xext/ripper/tools/generate.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/ripper/tools/generate.rb b/ext/ripper/tools/generate.rb
index 0efb99760..22c3ac0eb 100755
--- a/ext/ripper/tools/generate.rb
+++ b/ext/ripper/tools/generate.rb
@@ -79,13 +79,13 @@ def generate_eventids1(ids)
buf << %Q[ VALUE h;\n]
buf << %Q[ ID id;\n]
ids.each do |id, arity|
- buf << %Q[ ripper_id_#{id} = rb_intern("on_#{id}");\n]
+ buf << %Q[ ripper_id_#{id} = rb_intern_const("on_#{id}");\n]
end
buf << %Q[\n]
buf << %Q[ h = rb_hash_new();\n]
buf << %Q[ rb_define_const(self, "PARSER_EVENT_TABLE", h);\n]
ids.each do |id, arity|
- buf << %Q[ id = rb_intern("#{id}");\n]
+ buf << %Q[ id = rb_intern_const("#{id}");\n]
buf << %Q[ rb_hash_aset(h, ID2SYM(id), INT2NUM(#{arity}));\n]
end
buf << %Q[}\n]
@@ -101,7 +101,7 @@ def generate_eventids2_table(ids)
buf << %Q[ ID id;\n]
buf << %Q[ rb_define_const(self, "SCANNER_EVENT_TABLE", h);\n]
ids.each do |id|
- buf << %Q[ id = rb_intern("#{id}");\n]
+ buf << %Q[ id = rb_intern_const("#{id}");\n]
buf << %Q[ rb_hash_aset(h, ID2SYM(id), INT2NUM(1));\n]
end
buf << %Q[}\n]