summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-30 16:05:44 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-30 16:05:44 +0000
commita6bc3808218eb1c7a4f4f37a3d8d63f0833170a3 (patch)
tree1d4cb7893ca178dca925ba171b2ed9035bb1b6d6 /test
parent768cdfb2a3d4406db53e950b13134d4b6d70ca80 (diff)
merge revision(s) 56117: [Backport #12742]
* 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/branches/ruby_2_2@56309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_module.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 3aecccabed..468932757a 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -1306,6 +1306,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