From 5b46f6c602c24c9cdf995914fc6998981f1e53ec Mon Sep 17 00:00:00 2001 From: sorah Date: Tue, 10 Sep 2013 05:37:39 +0000 Subject: * vm_backtrace.c (vm_backtrace_to_ary): Ignore the second argument if it is nil. [Bug #8884] [ruby-core:57094] * test/ruby/test_backtrace.rb (test_caller_with_nil_length): Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_backtrace.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/ruby/test_backtrace.rb b/test/ruby/test_backtrace.rb index 6ab9032855..91dec4a943 100644 --- a/test/ruby/test_backtrace.rb +++ b/test/ruby/test_backtrace.rb @@ -85,6 +85,10 @@ class TestBacktrace < Test::Unit::TestCase rec[m] end + def test_caller_with_nil_length + assert_equal caller(0), caller(0, nil) + end + def test_caller_locations cs = caller(0); locs = caller_locations(0).map{|loc| loc.to_s -- cgit v1.2.3