mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_backtrace.rb: r18554 tests
* test/ruby/test_backtrace.rb (test_core_backtrace_{alias,undef}):
add tests for r18554. [ruby-dev:35820] [Bug #416]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
108aa6143e
commit
abf2980b7a
1 changed files with 20 additions and 0 deletions
|
|
@ -214,4 +214,24 @@ class TestBacktrace < Test::Unit::TestCase
|
|||
q << true
|
||||
end
|
||||
end
|
||||
|
||||
def test_core_backtrace_alias
|
||||
obj = BasicObject.new
|
||||
e = assert_raise(NameError) do
|
||||
class << obj
|
||||
alias foo bar
|
||||
end
|
||||
end
|
||||
assert_not_match(/\Acore#/, e.backtrace_locations[0].base_label)
|
||||
end
|
||||
|
||||
def test_core_backtrace_undef
|
||||
obj = BasicObject.new
|
||||
e = assert_raise(NameError) do
|
||||
class << obj
|
||||
undef foo
|
||||
end
|
||||
end
|
||||
assert_not_match(/\Acore#/, e.backtrace_locations[0].base_label)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue