diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-01 21:50:14 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-01 21:50:14 +0000 |
commit | effdbf5936cc090a618e13c8f9a1b5412ebab2fa (patch) | |
tree | c8410a18cbbe7ad013470fc06fef0c75ce0fd230 /test/rubygems/test_gem_util.rb | |
parent | 9c4ef4b191a1e6b9abdbb21c7c709d1d0f2397e6 (diff) |
* lib/rubygems: Update to RubyGems HEAD(c202db2).
this version contains many enhancements see http://git.io/vtNwF
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_util.rb')
-rw-r--r-- | test/rubygems/test_gem_util.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_util.rb b/test/rubygems/test_gem_util.rb index 414487acc0..2546262d7f 100644 --- a/test/rubygems/test_gem_util.rb +++ b/test/rubygems/test_gem_util.rb @@ -27,5 +27,13 @@ class TestGemUtil < Gem::TestCase assert_equal File.join(@tempdir, 'a'), enum.next end + def test_linked_list_find + list = [1,2,3,4,5].inject(Gem::List.new(0)) { |m,o| + Gem::List.new o, m + } + assert_equal 5, list.find { |x| x == 5 } + assert_equal 4, list.find { |x| x == 4 } + end + end |