diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-10 21:32:02 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-10 21:32:02 +0000 |
commit | c0cdff2c0fe1fdf841e673b0dcd14b43c9da3ac2 (patch) | |
tree | 4fe12e9135ea9fe05cb05d48fd0d2e409892653d /test | |
parent | d14b60fff0cc5d10b4573172d343411035e01ead (diff) |
Revert r34538.
* backport 33935,33936,33987 (fix private constant)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index cffc32221a..3258259cf7 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1019,19 +1019,6 @@ class TestModule < Test::Unit::TestCase assert_raise(NameError) { c::FOO } end - def test_private_constant2 - c = Class.new - c.const_set(:FOO, "foo") - c.const_set(:BAR, "bar") - assert_equal("foo", c::FOO) - assert_equal("bar", c::BAR) - c.private_constant(:FOO, :BAR) - assert_raise(NameError) { c::FOO } - assert_raise(NameError) { c::BAR } - assert_equal("foo", c.class_eval("FOO")) - assert_equal("bar", c.class_eval("BAR")) - end - class PrivateClass end private_constant :PrivateClass @@ -1079,27 +1066,6 @@ class TestModule < Test::Unit::TestCase assert_in_out_err([], src, %w(Object :ok), []) end - def test_private_constants_clear_inlinecache - bug5702 = '[ruby-dev:44929]' - src = <<-INPUT - class A - C = :Const - def self.get_C - A::C - end - # fill cache - A.get_C - private_constant :C, :D rescue nil - begin - A.get_C - rescue NameError - puts "A.get_C" - end - end - INPUT - assert_in_out_err([], src, %w(A.get_C), [], bug5702) - end - def test_constant_lookup_in_method_defined_by_class_eval src = <<-INPUT class A |