summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-31 04:03:55 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-31 04:03:55 +0000
commite4be7f97727f2d33af41be9d8d6a8879a088d886 (patch)
tree0e342cc282d50ca1173279612d7973842b5561ba /test/ruby
parent77df5bb1b5ab3e4d6ed32d0b43acb69b3167f5dd (diff)
* 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
Diffstat (limited to 'test/ruby')
-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|