mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Test for [Feature #16832]
This commit is contained in:
parent
385ac07fd8
commit
7d5da30c9e
1 changed files with 13 additions and 0 deletions
|
@ -57,6 +57,19 @@ class TestNameError < Test::Unit::TestCase
|
|||
assert_equal(:X, e.name)
|
||||
end
|
||||
|
||||
def test_info_const_name
|
||||
mod = Module.new do
|
||||
def self.name
|
||||
"ModuleName"
|
||||
end
|
||||
|
||||
def self.inspect
|
||||
raise "<unusable info>"
|
||||
end
|
||||
end
|
||||
assert_raise_with_message(NameError, /ModuleName/) {mod::DOES_NOT_EXIST}
|
||||
end
|
||||
|
||||
def test_info_method
|
||||
obj = PrettyObject.new
|
||||
|
||||
|
|
Loading…
Reference in a new issue