1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_iterator.rb (TestIterator::IterTest::each):

#each_pair is now alias to #each.  [ruby-dev:32192]

* test/ruby/test_iterator.rb (TestIterator::test_assoc_yield):
  ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-11-09 04:46:58 +00:00
parent 4ab384be2d
commit 364f0bfe9f
2 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,11 @@
Fri Nov 9 13:45:05 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* test/ruby/test_iterator.rb (TestIterator::IterTest::each):
#each_pair is now alias to #each. [ruby-dev:32192]
* test/ruby/test_iterator.rb (TestIterator::test_assoc_yield):
ditto
Fri Nov 9 12:56:36 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval_load.c (loaded_feature_path): check with type of given feature.

View file

@ -361,10 +361,7 @@ class TestIterator < Test::Unit::TestCase
def each
yield [:key, :value]
end
def each_pair
yield :key, :value
end
alias each_pair each
end
def test_assoc_yield
@ -373,9 +370,9 @@ class TestIterator < Test::Unit::TestCase
h.each{|a,| assert_equal(:key, a)}
h.each{|*a| assert_equal([[:key, :value]], a)}
h.each{|k,v| assert_equal([:key, :value], [k,v])}
h.each_pair{|a| assert_equal(:key, a)}
h.each_pair{|a| assert_equal([:key, :value], a)}
h.each_pair{|a,| assert_equal(:key, a)}
h.each_pair{|*a| assert_equal([:key, :value], a)}
h.each_pair{|*a| assert_equal([[:key, :value]], a)}
h.each_pair{|k,v| assert_equal([:key, :value], [k,v])}
}
end