diff options
Diffstat (limited to 'test/ruby/test_enum.rb')
-rw-r--r-- | test/ruby/test_enum.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb index edd389b071..6448796790 100644 --- a/test/ruby/test_enum.rb +++ b/test/ruby/test_enum.rb @@ -245,8 +245,8 @@ class TestEnumerable < Test::Unit::TestCase assert_equal("horse", ary.max) assert_equal("albatross", ary.max {|a,b| a.length <=> b.length }) assert_equal(1, [3,2,1].max{|a,b| b <=> a }) - assert_equal(%w[dog horse], ary.max(2)) - assert_equal(%w[horse albatross], + assert_equal(%w[horse dog], ary.max(2)) + assert_equal(%w[albatross horse], ary.max(2) {|a,b| a.length <=> b.length }) end @@ -278,7 +278,7 @@ class TestEnumerable < Test::Unit::TestCase a = %w(albatross dog horse) assert_equal("albatross", a.max_by {|x| x.length }) assert_equal(1, [2,3,1].max_by {|x| -x }) - assert_equal(%w[horse albatross], a.max_by(2) {|x| x.length }) + assert_equal(%w[albatross horse], a.max_by(2) {|x| x.length }) end def test_minmax_by |