diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-09 01:07:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-09 01:07:41 +0000 |
commit | a3cc3cc5c958e6e0bb9d650f396123d719c75ca3 (patch) | |
tree | 15778eae93cee1e35b6a5f6b358e80299aefeb6b /test | |
parent | bef96f5a3f7c2740dc175ea0a659e7581c761c5d (diff) | |
download | ruby-a3cc3cc5c958e6e0bb9d650f396123d719c75ca3.tar.gz |
variable.c: fix private constant message
* variable.c (rb_const_search): raise with the actual class/module
name which defines the private constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 0f9351c57d..43bd3f72b6 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1360,6 +1360,9 @@ class TestModule < Test::Unit::TestCase c.const_set(:FOO, "foo") $VERBOSE = verbose assert_raise(NameError) { c::FOO } + assert_raise_with_message(NameError, /#{c}::FOO/) do + Class.new(c)::FOO + end end def test_private_constant2 |