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

ruby-changes:42505

From: akr <ko1@a...>
Date: Thu, 14 Apr 2016 21:00:29 +0900 (JST)
Subject: [ruby-changes:42505] akr:r54579 (trunk): add an assertion.

akr	2016-04-14 21:57:07 +0900 (Thu, 14 Apr 2016)

  New Revision: 54579

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54579

  Log:
    add an assertion.

  Modified files:
    trunk/test/ruby/test_array.rb
Index: test/ruby/test_array.rb
===================================================================
--- test/ruby/test_array.rb	(revision 54578)
+++ test/ruby/test_array.rb	(revision 54579)
@@ -2744,6 +2744,8 @@ class TestArray < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_array.rb#L2744
     assert_int_equal(13, [1, 2].sum(10))
     assert_int_equal(16, [1, 2].sum(10) {|v| v * 2 })
 
+    assert_raise(TypeError) { [Object.new].sum }
+
     large_number = 100000000
     small_number = 1e-9
     until (large_number + small_number) == large_number

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

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