aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_backtrace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_backtrace.rb')
-rw-r--r--test/ruby/test_backtrace.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_backtrace.rb b/test/ruby/test_backtrace.rb
index bd65e40036..2325c9306b 100644
--- a/test/ruby/test_backtrace.rb
+++ b/test/ruby/test_backtrace.rb
@@ -92,6 +92,13 @@ class TestBacktrace < Test::Unit::TestCase
assert_equal(cs, locs)
end
+ def test_caller_locations_with_range
+ cs = caller(0,2); locs = caller_locations(0..1).map { |loc|
+ loc.to_s
+ }
+ assert_equal(cs, locs)
+ end
+
def test_caller_locations_to_s_inspect
cs = caller(0); locs = caller_locations(0)
cs.zip(locs){|str, loc|