From 4f03f0cb67b0bf6497ffd4051e872905e3b49ead Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 24 Aug 2011 00:52:04 +0000 Subject: * 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/trunk@33045 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