[前][次][番号順一覧][スレッド一覧]

ruby-changes:59953

From: Nobuyoshi <ko1@a...>
Date: Fri, 7 Feb 2020 18:11:50 +0900 (JST)
Subject: [ruby-changes:59953] b64b0f3433 (master): Show unmatched sequence on failure

https://git.ruby-lang.org/ruby.git/commit/?id=b64b0f3433

From b64b0f3433b1dafa50ecd12b86567e3df863d57a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 7 Feb 2020 18:10:36 +0900
Subject: Show unmatched sequence on failure


diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index a94bbce..0daa3cc 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -892,7 +892,8 @@ class TestFloat < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_float.rb#L892
       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)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]