* enum.c (enum_join): remove Enumerable#join. [ruby-core:24786]

* array.c (ary_join_1): use #to_ary to detect recursive array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2010-03-13 05:55:46 +00:00
parent b1bf026f48
commit 8b55878d2a
5 changed files with 8 additions and 54 deletions

View file

@ -1565,7 +1565,7 @@ class TestArray < Test::Unit::TestCase
a << a
assert_raise(ArgumentError){a.join}
def (a = Object.new).to_a
def (a = Object.new).to_ary
[self]
end
assert_raise(ArgumentError, '[ruby-core:24150]'){[a].join}