diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-22 10:26:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-22 10:26:40 +0000 |
commit | af1ca4cb132dba91dd88471170d3106d304f0e24 (patch) | |
tree | 822c0c91a493e05f4071fe2b620abfe73319580c /test/ruby/test_module.rb | |
parent | 6a35c26b2dfbd2a516e450e916eb8d13c3ff5ddf (diff) | |
download | ruby-af1ca4cb132dba91dd88471170d3106d304f0e24.tar.gz |
object.c: check more strictly
* object.c (rb_mod_const_get): check more strictly. [ruby-dev:46748]
[Bug #7573]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index eb1477893b..84dedb431b 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -246,8 +246,9 @@ class TestModule < Test::Unit::TestCase ":Object", "", ":", - ].each do |name| - e = assert_raises(NameError) { + ["String::", "[Bug #7573]"], + ].each do |name, msg| + e = assert_raises(NameError, "#{msg}#{': ' if msg}wrong constant name #{name.dump}") { Object.const_get name } assert_equal("wrong constant name %s" % name, e.message) |