1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_backtrace.rb: test Thread#backtrace_locations with range

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2013-02-23 08:08:24 +00:00
parent a153ce31a1
commit 5a34caab4f

View file

@ -141,4 +141,21 @@ class TestBacktrace < Test::Unit::TestCase
q << true
end
end
def test_thread_backtrace_locations_with_range
begin
q = Queue.new
th = Thread.new{
th_rec q
}
sleep 0.5
bt = th.backtrace(0,2)
locs = th.backtrace_locations(0..1).map { |loc|
loc.to_s
}
assert_equal(bt, locs)
ensure
q << true
end
end
end