summaryrefslogtreecommitdiff
path: root/ext/ripper
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 05:39:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 05:39:02 +0000
commitb5be3e78938ba17d389df1c8f4bdbcc8b4c73550 (patch)
treecc65cac1c274e6d186ffa69f4fd1da1b81a9f648 /ext/ripper
parentb54f2addaaa69a3f8588200d1e9e933738398c6d (diff)
dsl.rb: ID constants
* ext/ripper/tools/dsl.rb (DSL#method_missing): expand ID constnats without parentheses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/ripper')
-rw-r--r--ext/ripper/tools/dsl.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/ripper/tools/dsl.rb b/ext/ripper/tools/dsl.rb
index 848bd2f..0997a09 100644
--- a/ext/ripper/tools/dsl.rb
+++ b/ext/ripper/tools/dsl.rb
@@ -43,6 +43,8 @@ class DSL
event = $`
@events[event] = args.size
"dispatch#{ args.size }(#{ [event, *args].join(", ") })"
+ elsif args.empty? and /\Aid[A-Z]/ =~ event.to_s
+ event
else
"#{ event }(#{ args.join(", ") })"
end