diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-12 15:39:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-12 15:39:10 +0000 |
commit | e8950106c92236216d5d819ba6c4db2b9423eddd (patch) | |
tree | ccdbf08e808a7d765aa1b0f4169203400480a75a | |
parent | bc536d36c5673c1781a231b5f8e3fe0ebaf4823f (diff) | |
download | ruby-e8950106c92236216d5d819ba6c4db2b9423eddd.tar.gz |
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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | test/ruby/test_array.rb | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Thu Oct 13 00:39:08 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@gmail.com> * doc/extension.rdoc: Replace "You can defined hooked variables" diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index a19e22aab4..bdb603bec5 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1488,7 +1488,7 @@ class TestArray < Test::Unit::TestCase 1 } } - o2 = o1.dup + o2 = o1.clone ary << o1 << o2 orig = ary.dup assert_raise(RuntimeError, "frozen during comparison") {ary.sort!} |