summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 17:52:51 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 17:52:51 +0000
commit8a489a7d6f1394e22c80d7744ea68e466ec14b26 (patch)
tree01355739f2be14cfae845a7091f77bed79f60f88 /ext
parentf69bf708814c0abc600a5c6a669676baca7fc4aa (diff)
ext/ripper/tools/dsl.rb: Use String#sub instead of delete_suffix
It fails when baseruby is old. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-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 3c4c11c..aafaa6f 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|