From ceb94d988812e26fa53f55a72ac06305ed959576 Mon Sep 17 00:00:00 2001 From: sorah Date: Thu, 25 Aug 2011 04:13:53 +0000 Subject: * backport r33045 from trunk. * insns.def (defined): fix to checking class variable. A patch by Magnus Holm . Thanks! * test/ruby/test_variable.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_variable.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby/test_variable.rb') diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb index 53e00301dc..32b3d61573 100644 --- a/test/ruby/test_variable.rb +++ b/test/ruby/test_variable.rb @@ -55,6 +55,11 @@ class TestVariable < Test::Unit::TestCase assert_equal("Cronus", atlas.ruler0) assert_equal("Zeus", atlas.ruler3) assert_equal("Cronus", atlas.ruler4) + assert_nothing_raised do + class << Gods + defined?(@@rule) && @@rule + end + end end def test_local_variables -- cgit v1.2.3