From e4be7f97727f2d33af41be9d8d6a8879a088d886 Mon Sep 17 00:00:00 2001 From: zzak Date: Mon, 31 Dec 2012 04:03:55 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ test/ruby/test_backtrace.rb | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4005615b8c..cb7869d3a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Dec 31 13:05:00 2012 Zachary Scott + + * test/ruby/test_backtrace.rb: Add test for r37957 [Feature #7434] + Sun Dec 30 23:33:36 2012 Nobuyoshi Nakada * parse.y (simple_re_meta): escaped closing parenthsis has different 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|