diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-24 00:52:04 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-24 00:52:04 +0000 |
commit | 4f03f0cb67b0bf6497ffd4051e872905e3b49ead (patch) | |
tree | 5bebcb6d8c4809603a6964dc63602af5c56d6753 /test/ruby/test_variable.rb | |
parent | 61920a128a2593f6fb968cfd4928499f0a3e2ed3 (diff) |
* insns.def (defined): fix to checking class variable.
A patch by Magnus Holm <judofyr@gmail.com>. 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
Diffstat (limited to 'test/ruby/test_variable.rb')
-rw-r--r-- | test/ruby/test_variable.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |