aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_integer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_integer.rb')
-rw-r--r--test/ruby/test_integer.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb
index 840192c5ad..7f8212ebf0 100644
--- a/test/ruby/test_integer.rb
+++ b/test/ruby/test_integer.rb
@@ -150,10 +150,10 @@ class TestInteger < Test::Unit::TestCase
1.upto(0) {|x| a << x }
assert_equal([], a)
- x = 2**30 - 1
+ y = 2**30 - 1
a = []
- x.upto(x+2) {|x| a << x }
- assert_equal([x, x+1, x+2], a)
+ y.upto(y+2) {|x| a << x }
+ assert_equal([y, y+1, y+2], a)
end
def test_downto
@@ -165,10 +165,10 @@ class TestInteger < Test::Unit::TestCase
1.downto(2) {|x| a << x }
assert_equal([], a)
- x = -(2**30)
+ y = -(2**30)
a = []
- x.downto(x-2) {|x| a << x }
- assert_equal([x, x-1, x-2], a)
+ y.downto(y-2) {|x| a << x }
+ assert_equal([y, y-1, y-2], a)
end
def test_times