ruby-changes:44335
From: nobu <ko1@a...>
Date: Thu, 13 Oct 2016 00:39:14 +0900 (JST)
Subject: [ruby-changes:44335] nobu:r56410 (trunk): test_array.rb: do not assume stable sort
nobu 2016-10-13 00:39:10 +0900 (Thu, 13 Oct 2016) New Revision: 56410 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56410 Log: test_array.rb: do not assume stable sort * test/ruby/test_array.rb (test_sort_bang_with_freeze): make a clone to copy a <=> singleton method, instead of dup. which element will be called is not predictable. [ruby-core:76088] [Bug #12509] Modified files: trunk/ChangeLog trunk/test/ruby/test_array.rb Index: test/ruby/test_array.rb =================================================================== --- test/ruby/test_array.rb (revision 56409) +++ test/ruby/test_array.rb (revision 56410) @@ -1488,7 +1488,7 @@ class TestArray < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_array.rb#L1488 1 } } - o2 = o1.dup + o2 = o1.clone ary << o1 << o2 orig = ary.dup assert_raise(RuntimeError, "frozen during comparison") {ary.sort!} Index: ChangeLog =================================================================== --- ChangeLog (revision 56409) +++ ChangeLog (revision 56410) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Oct 13 00:39:08 2016 Nobuyoshi Nakada <nobu@r...> + + * test/ruby/test_array.rb (test_sort_bang_with_freeze): make a + clone to copy a <=> singleton method, instead of dup. which + element will be called is not predictable. + [ruby-core:76088] [Bug #12509] + Thu Oct 13 00:21:27 2016 Simon Soriano <simon0191@g...> * doc/extension.rdoc: Replace "You can defined hooked variables" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/