summaryrefslogtreecommitdiff
path: root/test/ruby/test_arithmetic_sequence.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_arithmetic_sequence.rb')
-rw-r--r--test/ruby/test_arithmetic_sequence.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_arithmetic_sequence.rb b/test/ruby/test_arithmetic_sequence.rb
index 88fd3136cc..143906f4e2 100644
--- a/test/ruby/test_arithmetic_sequence.rb
+++ b/test/ruby/test_arithmetic_sequence.rb
@@ -254,6 +254,11 @@ class TestArithmeticSequence < Test::Unit::TestCase
'[ruby-core:90648] [Bug #15444]')
end
+ def test_last_bug17218
+ seq = (1.0997r .. 1.1r).step(0.0001r)
+ assert_equal([1.0997r, 1.0998r, 1.0999r, 1.1r], seq.to_a, '[ruby-core:100312] [Bug #17218]')
+ end
+
def test_slice
seq = 1.step(10, 2)
assert_equal([[1, 3, 5], [7, 9]], seq.each_slice(3).to_a)