....your one-liner below is even more confusing for this newbie...i 
already know what collect & sprintf does...i'm just hung-up on that 
'end.join' part...why doesn't endlessly recursively call itself....i 
guess to remove all doubt in a clearer multi-line example show the wrong 
way that will endlessly recursively call itself so that i can know in 
better detail.what's happening...???? tia...


ts wrote:
>>>>>> "d" == dave rose <bitdoger2 / yahoo.com> writes:
> 
> d>     collect do |item|
> d>      sprintf( format, item )
> d>     end.join( sep )<<<<big confusing stmt
> 
>  #collect return an Array : this mean that ruby will call Array#join 
> rather
>  than ArrayMine#join
> 
> moulon% ruby -e 'class A < Array; end; a = A[1, 2]; p a.class; p 
> a.collect {|i| i}.class'
> A
> Array
> moulon%
> 
> 
> Guy Decoux


-- 
Posted via http://www.ruby-forum.com/.