summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-07 18:10:36 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-07 18:10:36 +0900
commitb64b0f3433b1dafa50ecd12b86567e3df863d57a (patch)
treef6bdf2b66e2de6dd77b818de7f265955a49b6346 /test
parent115fec062ccf7c6d72c8d5f64b7a5d84c9fb2dd8 (diff)
Show unmatched sequence on failure
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_float.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index a94bbce49e..0daa3cca57 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -892,7 +892,8 @@ class TestFloat < Test::Unit::TestCase
a = rand
b = a+rand*1000
s = (b - a) / 10
- assert_equal(10, (a...b).step(s).to_a.length)
+ seq = (a...b).step(s)
+ assert_equal(10, seq.to_a.length, seq.inspect)
end
assert_equal([1.0, 2.9, 4.8, 6.699999999999999], (1.0...6.8).step(1.9).to_a)