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

ruby-changes:64050

From: Kenta <ko1@a...>
Date: Thu, 10 Dec 2020 01:00:18 +0900 (JST)
Subject: [ruby-changes:64050] 2544f7196e (master): test/ruby/test_arithmetic_sequence.rb: restore test_last_bug17218

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

From 2544f7196ee7d157000244ca9cac55514e3b193d Mon Sep 17 00:00:00 2001
From: Kenta Murata <mrkn@m...>
Date: Thu, 10 Dec 2020 00:58:44 +0900
Subject: test/ruby/test_arithmetic_sequence.rb: restore test_last_bug17218

And rename the existing `test_last_bug17218` to `test_to_a_bug17218`.

diff --git a/test/ruby/test_arithmetic_sequence.rb b/test/ruby/test_arithmetic_sequence.rb
index 80e3da0..5e2a825 100644
--- a/test/ruby/test_arithmetic_sequence.rb
+++ b/test/ruby/test_arithmetic_sequence.rb
@@ -264,6 +264,11 @@ class TestArithmeticSequence < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_arithmetic_sequence.rb#L264
     assert_instance_of Integer, res[1]
   end
 
+  def test_last_bug17218
+    seq = (1.0997r .. 1.1r).step(0.0001r)
+    assert_equal(1.1r, seq.last, '[ruby-core:100312] [Bug #17218]')
+  end
+
   def test_to_a
     assert_equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 1.step(10).to_a)
     assert_equal([1, 3, 5, 7, 9], 1.step(10, 2).to_a)
@@ -279,7 +284,7 @@ class TestArithmeticSequence < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_arithmetic_sequence.rb#L284
                           '[ruby-core:90648] [Bug #15444]')
   end
 
-  def test_last_bug17218
+  def test_to_a_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
-- 
cgit v0.10.2


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

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