ruby-changes:39059
From: hsbt <ko1@a...>
Date: Sat, 4 Jul 2015 19:39:35 +0900 (JST)
Subject: [ruby-changes:39059] hsbt:r51140 (trunk): * Add test for `Enumerable#sort` with block. Patch by @yui-knk
hsbt 2015-07-04 19:39:17 +0900 (Sat, 04 Jul 2015) New Revision: 51140 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51140 Log: * Add test for `Enumerable#sort` with block. Patch by @yui-knk [fix GH-954] Modified files: trunk/ChangeLog trunk/test/ruby/test_enum.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 51139) +++ ChangeLog (revision 51140) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Jul 4 19:39:08 2015 SHIBATA Hiroshi <hsbt@r...> + + * Add test for `Enumerable#sort` with block. Patch by @yui-knk + [fix GH-954] + Sat Jul 4 14:38:43 2015 Eric Wong <e@8...> * enum.c (zip_ary): remove volatile, use RB_GC_GUARD Index: test/ruby/test_enum.rb =================================================================== --- test/ruby/test_enum.rb (revision 51139) +++ test/ruby/test_enum.rb (revision 51140) @@ -221,6 +221,7 @@ class TestEnumerable < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/ruby/test_enum.rb#L221 def test_sort assert_equal([1, 1, 2, 2, 3], @obj.sort) + assert_equal([3, 2, 2, 1, 1], @obj.sort {|x, y| y <=> x }) end def test_sort_by -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/