From e4be7f97727f2d33af41be9d8d6a8879a088d886 Mon Sep 17 00:00:00 2001 From: zzak Date: Mon, 31 Dec 2012 04:03:55 +0000 Subject: * test/ruby/test_backtrace.rb: Add test for r37957 [Feature #7434] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_backtrace.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby/test_backtrace.rb') 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| -- cgit v1.2.3