diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-04 10:39:17 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-04 10:39:17 +0000 |
commit | 1012cd5e3c4642982888ca704d2584e2afa761e7 (patch) | |
tree | 0891a9ee49a5662408c8e86d2fd4328d9bd52ad4 /test | |
parent | 14de6ade12cdf8f444c94e0d1aef37f09f6fa1bb (diff) | |
download | ruby-1012cd5e3c4642982888ca704d2584e2afa761e7.tar.gz |
* Add test for `Enumerable#sort` with block. Patch by @yui-knk
[fix GH-954]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_enum.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb index a599fab498..92c032258b 100644 --- a/test/ruby/test_enum.rb +++ b/test/ruby/test_enum.rb @@ -221,6 +221,7 @@ class TestEnumerable < Test::Unit::TestCase 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 |