test/test_range.rb in rubyjs-0.7.0 vs test/test_range.rb in rubyjs-0.7.1
- old
+ new
@@ -3,10 +3,14 @@
a = Range.new(0,2)
p a.first
p a.last
p a
+ i = 1
+ p ((i..i+5).to_s)
+ p ((i...i+i).to_s)
+
p ((0..2).to_s)
p ((0...2).to_s)
(0..4).each do |i| p i end
(0...4).each do |i| p i end
@@ -43,9 +47,22 @@
p (true == true)
p ((0..2) == (0..2))
p ((0..2) == Range.new(0,2))
p ((0..2) == (0...2))
+
+ j = 55
+ p j
+ for i in 1..100
+ j = i
+ end
+ p j
+
+ j = 54
+ p j
+ for j in 1..100
+ end
+ p j
end
def self.main
new.test
end