summaryrefslogtreecommitdiff
path: root/ext/ripper/tools
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ripper/tools')
-rw-r--r--ext/ripper/tools/dsl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ripper/tools/dsl.rb b/ext/ripper/tools/dsl.rb
index 3c4c11cdd0..aafaa6f407 100644
--- a/ext/ripper/tools/dsl.rb
+++ b/ext/ripper/tools/dsl.rb
@@ -55,7 +55,7 @@ class DSL
end
def add_event(event, args, qundef_check = false)
- event = event.to_s.delete_suffix("!")
+ event = event.to_s.sub(/!\z/, "")
@events[event] = args.size
vars = []
args.each do |arg|