ruby-changes:49876
From: mame <ko1@a...>
Date: Sun, 21 Jan 2018 02:52:56 +0900 (JST)
Subject: [ruby-changes:49876] mame:r61994 (trunk): ext/ripper/tools/dsl.rb: Use String#sub instead of delete_suffix
mame 2018-01-21 02:52:51 +0900 (Sun, 21 Jan 2018) New Revision: 61994 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61994 Log: ext/ripper/tools/dsl.rb: Use String#sub instead of delete_suffix It fails when baseruby is old. Modified files: trunk/ext/ripper/tools/dsl.rb Index: ext/ripper/tools/dsl.rb =================================================================== --- ext/ripper/tools/dsl.rb (revision 61993) +++ ext/ripper/tools/dsl.rb (revision 61994) @@ -55,7 +55,7 @@ class DSL https://github.com/ruby/ruby/blob/trunk/ext/ripper/tools/dsl.rb#L55 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| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/