ruby-changes:56266
From: Nobuyoshi <ko1@a...>
Date: Sat, 29 Jun 2019 08:12:35 +0900 (JST)
Subject: [ruby-changes:56266] Nobuyoshi Nakada: ede056909b (trunk): Set file name and line number
https://git.ruby-lang.org/ruby.git/commit/?id=ede056909b From ede056909bf20356928a28a6165b31e6c8cb6687 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 29 Jun 2019 01:31:52 +0900 Subject: Set file name and line number diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index d93afff..5f36077 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -425,7 +425,7 @@ class TestRubyOptimization < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_optimization.rb#L425 def test_tailcall_condition_block bug = '[ruby-core:78015] [Bug #12905]' - src = "#{<<-"begin;"}\n#{<<~"end;"}" + src = "#{<<-"begin;"}\n#{<<~"end;"}", __FILE__, nil, __LINE__+1 begin; def run(current, final) if current < final @@ -437,13 +437,13 @@ class TestRubyOptimization < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_optimization.rb#L437 end; obj = Object.new - self.class.tailcall(obj.singleton_class, src, tailcall: false) + self.class.tailcall(obj.singleton_class, *src, tailcall: false) e = assert_raise(SystemStackError) { obj.run(1, Float::INFINITY) } level = e.backtrace_locations.size obj = Object.new - self.class.tailcall(obj.singleton_class, src, tailcall: true) + self.class.tailcall(obj.singleton_class, *src, tailcall: true) level *= 2 mesg = message {"#{bug}: #{$!.backtrace_locations.size} / #{level} stack levels"} assert_nothing_raised(SystemStackError, mesg) { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/