Add a test for the previous commit

This commit is contained in:
Yusuke Endoh 2025-05-02 17:33:20 +09:00
parent 10767283dd
commit b7cb29b6b2
Notes: git 2025-06-18 05:52:37 +00:00

View file

@ -454,4 +454,10 @@ class TestBacktrace < Test::Unit::TestCase
foo::Bar.baz
end;
end
def test_backtrace_internal_frame
backtrace = tap { break caller_locations(0) }
assert_equal(__FILE__, backtrace[1].path) # not "<internal:kernel>"
assert_equal("Kernel#tap", backtrace[1].label)
end
end