summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2025-05-02 17:33:20 +0900
committerYusuke Endoh <[email protected]>2025-06-18 14:51:56 +0900
commitb7cb29b6b24371dd1d4678b2bc6fcfc1bf9f3eee (patch)
tree6fda00c724ba26254a88a72da63f770d827f539e /test/ruby
parent10767283dd0277a1d780790ce6bde67cf2c832a2 (diff)
Add a test for the previous commit
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13238
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_backtrace.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_backtrace.rb b/test/ruby/test_backtrace.rb
index fca7b62030..01a757f827 100644
--- a/test/ruby/test_backtrace.rb
+++ b/test/ruby/test_backtrace.rb
@@ -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