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 | a213d41c11dbc227f02a3bc15bca8377c3e34be9 (patch) | |
tree | 15778eae93cee1e35b6a5f6b358e80299aefeb6b /test/ruby/test_module.rb | |
parent | 51b6ab76e83173ca57eded7ce14094e125ee0b73 (diff) | |
download | ruby-a213d41c11dbc227f02a3bc15bca8377c3e34be9.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/ruby/test_module.rb')
-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 |