vm_insnhelper.c: deprecated constant in class

* vm_insnhelper.c (vm_get_ev_const): warn deprecated constant even
  in the class context.  [ruby-core:75505] [Bug #12382]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-05-15 01:57:28 +00:00
parent 6d4fb98e59
commit 5cb5692ac8
4 changed files with 24 additions and 9 deletions

View file

@ -1415,6 +1415,8 @@ class TestModule < Test::Unit::TestCase
c.const_set(:FOO, "foo")
c.deprecate_constant(:FOO)
assert_warn(/deprecated/) {c::FOO}
bug12382 = '[ruby-core:75505] [Bug #12382]'
assert_warn(/deprecated/, bug12382) {c.class_eval "FOO"}
end
def test_constants_with_private_constant