Skip to content

Commit

Permalink
adding one more evil cvar test
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3160 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Dec 23, 2009
1 parent b6b0230 commit 27e64f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test_vm/cvar.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
assert ":ok", "begin; p @@foo; rescue NameError; p :ok; end"
assert "42", "@@foo = 42; p @@foo"

assert "42", %{
class X
@@foo = 41
def foo; @@foo; end
end
class Y < X
@@foo += 1
end
p X.new.foo
}

0 comments on commit 27e64f5

Please sign in to comment.