From af8f8e5b0e135570f9e5cd2aa8e949ec2e204b31 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 10 Jul 2009 07:30:08 +0000 Subject: * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@24017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_array.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby/test_array.rb') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 7b0039310a..8a442087ae 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 -- cgit v1.2.3