summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-12 15:39:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-12 15:39:10 +0000
commit89230e7ca3608703dfad5829b42f3e78518549f2 (patch)
treeccdbf08e808a7d765aa1b0f4169203400480a75a /test
parent9d8f62d55ebec188b9d86db198893dade255af90 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_array.rb2
1 files changed, 1 insertions, 1 deletions
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!}