summaryrefslogtreecommitdiff
path: root/test/ruby/test_variable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_variable.rb')
-rw-r--r--test/ruby/test_variable.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb
index 305a6f22c5..ab0e405115 100644
--- a/test/ruby/test_variable.rb
+++ b/test/ruby/test_variable.rb
@@ -32,14 +32,11 @@ class TestVariable < Test::Unit::TestCase
end
def test_variable
- assert($$.instance_of?(Fixnum))
-
+ assert_instance_of(Fixnum, $$)
+
# read-only variable
- begin
+ assert_raises(NameError) do
$$ = 5
- assert false
- rescue NameError
- assert true
end
foobar = "foobar"