summaryrefslogtreecommitdiff
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
commit1a41f6dbf48c8c54f529b303f1310db6c34cc76b (patch)
tree3b86ce7d03415f80d6524bf874299e21e48501ae /ext/ripper/tools
parent91e5f7d51af4256bb11edfba3c7918d534fc8181 (diff)
* 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: svn+ssh://ci.ruby-lang.org/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 0efb997604..22c3ac0eb7 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]