ruby-changes:51080
From: k0kubun <ko1@a...>
Date: Sat, 28 Apr 2018 18:03:01 +0900 (JST)
Subject: [ruby-changes:51080] k0kubun:r63287 (trunk): test_bug_reporter.rb: make it work with --jit
k0kubun 2018-04-28 18:02:56 +0900 (Sat, 28 Apr 2018) New Revision: 63287 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63287 Log: test_bug_reporter.rb: make it work with --jit test_rubyoptions.rb: replace gsub with sub because it's suboptimal for this Modified files: trunk/test/-ext-/bug_reporter/test_bug_reporter.rb trunk/test/ruby/test_rubyoptions.rb Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 63286) +++ test/ruby/test_rubyoptions.rb (revision 63287) @@ -110,7 +110,7 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L110 assert_in_out_err(["-vve", ""]) do |r, e| assert_match(VERSION_PATTERN, r[0]) description = RUBY_DESCRIPTION - description = description.gsub(/\+JIT /, '') if RubyVM::MJIT.enabled? + description = description.sub(/\+JIT /, '') if RubyVM::MJIT.enabled? assert_equal(description, r[0]) assert_equal([], e) end Index: test/-ext-/bug_reporter/test_bug_reporter.rb =================================================================== --- test/-ext-/bug_reporter/test_bug_reporter.rb (revision 63286) +++ test/-ext-/bug_reporter/test_bug_reporter.rb (revision 63287) @@ -4,10 +4,12 @@ require 'tmpdir' https://github.com/ruby/ruby/blob/trunk/test/-ext-/bug_reporter/test_bug_reporter.rb#L4 class TestBugReporter < Test::Unit::TestCase def test_bug_reporter_add + description = RUBY_DESCRIPTION + description = description.sub(/\+JIT /, '') if RubyVM::MJIT.enabled? expected_stderr = [ :*, /\[BUG\]\sSegmentation\sfault.*\n/, - /#{ Regexp.quote(RUBY_DESCRIPTION) }\n\n/, + /#{ Regexp.quote(description) }\n\n/, :*, /Sample bug reporter: 12345/, :* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/