diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-10 07:30:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-10 07:30:08 +0000 |
commit | 08ca88378f404d6672cbee1b95fec14597e0e597 (patch) | |
tree | 627e3a415dba6b7f070bc0c60db0eec60af897ff /test/ruby/test_array.rb | |
parent | 72fb77606d82cfb43ee28492fd7469af0dc62634 (diff) | |
download | ruby-08ca88378f404d6672cbee1b95fec14597e0e597.tar.gz ruby-08ca88378f404d6672cbee1b95fec14597e0e597.tar.xz ruby-08ca88378f404d6672cbee1b95fec14597e0e597.zip |
* array.c (recursive_join): use obj to tell if recursion occurs.
[ruby-core:24150]
* enum.c (enum_join): reverted r23966. [ruby-core:24196]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r-- | test/ruby/test_array.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 7b0039310..8a442087a 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1491,6 +1491,11 @@ class TestArray < Test::Unit::TestCase a = [] a << a assert_equal("[...]", a.join) + + def (a = Object.new).to_a + [self] + end + assert_equal("[...]", [a].join, , '[ruby-core:24150]') end def test_to_a2 |