mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test_array.rb: Make test more precise
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d90128833b
commit
e25f03a6a5
1 changed files with 1 additions and 1 deletions
|
@ -1911,7 +1911,7 @@ class TestArray < Test::Unit::TestCase
|
||||||
|
|
||||||
ary = Object.new
|
ary = Object.new
|
||||||
def ary.to_a; [1, 2]; end
|
def ary.to_a; [1, 2]; end
|
||||||
assert_raise(TypeError, NoMethodError) {%w(a b).zip(ary)}
|
assert_raise(TypeError) {%w(a b).zip(ary)}
|
||||||
def ary.each; [3, 4].each{|e|yield e}; end
|
def ary.each; [3, 4].each{|e|yield e}; end
|
||||||
assert_equal([['a', 3], ['b', 4]], %w(a b).zip(ary))
|
assert_equal([['a', 3], ['b', 4]], %w(a b).zip(ary))
|
||||||
def ary.to_ary; [5, 6]; end
|
def ary.to_ary; [5, 6]; end
|
||||||
|
|
Loading…
Add table
Reference in a new issue