summaryrefslogtreecommitdiff
path: root/test/ruby/test_ifunless.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_ifunless.rb')
-rw-r--r--test/ruby/test_ifunless.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/ruby/test_ifunless.rb b/test/ruby/test_ifunless.rb
index bffc794512..f68e5154a2 100644
--- a/test/ruby/test_ifunless.rb
+++ b/test/ruby/test_ifunless.rb
@@ -1,14 +1,15 @@
+# frozen_string_literal: false
require 'test/unit'
-class TestIfunless < Test::Unit::TestCase
+class TestIfUnless < Test::Unit::TestCase
def test_if_unless
- $x = 'test';
- assert(if $x == $x then true else false end)
- $bad = false
- unless $x == $x
- $bad = true
+ x = 'test';
+ assert(if x == x then true else false end)
+ bad = false
+ unless x == x
+ bad = true
end
- assert(!$bad)
- assert(unless $x != $x then true else false end)
+ assert(!bad)
+ assert(unless x != x then true else false end)
end
end