diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-29 01:31:52 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-29 01:31:52 +0900 |
commit | ede056909bf20356928a28a6165b31e6c8cb6687 (patch) | |
tree | 8f6444fbe0887d6f9c3f8cb8affa0b60b1a0e0ad | |
parent | d12d53a6c8d959687d4ecec54501f3b13a806941 (diff) | |
download | ruby-ede056909bf20356928a28a6165b31e6c8cb6687.tar.gz |
Set file name and line number
-rw-r--r-- | test/ruby/test_optimization.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index d93afff500..5f360779cf 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -425,7 +425,7 @@ class TestRubyOptimization < Test::Unit::TestCase 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 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) { |