summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 13:11:11 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 13:11:11 +0000
commitbf7621d81de22df639d9a8e0e0efcbdaff467b4c (patch)
treeac1f8514adfe2c7e54ddb1c4e672e601dfc972db /ext
parent814daf855e0aa2c3a1164dc765378d3a092a1825 (diff)
parse.y: Allows Ripper DSL to embed C function calls as `foo!`
Instead of `_foo`. This makes it useful to do word boundary search of the editor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/ripper/tools/dsl.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ripper/tools/dsl.rb b/ext/ripper/tools/dsl.rb
index e321019..e67294e 100644
--- a/ext/ripper/tools/dsl.rb
+++ b/ext/ripper/tools/dsl.rb
@@ -35,8 +35,8 @@ class DSL
end
def method_missing(*args)
- if args.first =~ /\A_/
- "#{ $' }(#{ args.drop(1).join(", ") })"
+ if args.first =~ /!\z/
+ "#{ $` }(#{ args.drop(1).join(", ") })"
else
@events[args.first.to_s] = args.size - 1
"dispatch#{ args.size - 1 }(#{ args.join(", ") })"