From 6b534134a78e3e43c344682c3585e1abab015216 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 27 Jun 2018 09:28:09 +0000 Subject: give up insn attr handles_frame I introduced this mechanism in r62051 to speed things up. Later it was reported that the change causes problems. I searched for workarounds but nothing seemed appropriate. I hereby officially give it up. The idea to move ADD_PC around was a mistake. Fixes [Bug #14809] and [Bug #14834]. Signed-off-by: Urabe, Shyouhei git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_settracefunc.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index b6ec2f14eb..edb356d3dd 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -1901,4 +1901,17 @@ class TestSetTraceFunc < Test::Unit::TestCase assert_equal ["c-call", base_line + 35], events[9] # Thread#set_trace_func assert_equal nil, events[10] end + + def test_lineno_in_optimized_insn + actual, _, _ = EnvUtil.invoke_ruby [], <<-EOF.gsub(/^.*?: */, ""), true + 1: class String + 2: def -@ + 3: puts caller_locations(1, 1)[0].lineno + 4: end + 5: end + 6: + 7: -"" + EOF + assert_equal "7\n", actual, '[Bug #14809]' + end end -- cgit v1.2.3