summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-25 04:13:53 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-25 04:13:53 +0000
commitceb94d988812e26fa53f55a72ac06305ed959576 (patch)
treeb6815831e7070d4edb90cb5f6c874ecdf241ee9a /test
parentf30e113b1df5a6ea1b80b665baa7f93e3df052ca (diff)
* backport r33045 from trunk.
* 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/branches/ruby_1_9_3@33068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_variable.rb5
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