logo       
Bookmark and Share

Re: print vs puts behaviour for overloaded Array#to_s: msg#00784

lang.ruby.general

Subject: Re: print vs puts behaviour for overloaded Array#to_s

>>>>> "S" == Steve Hill <stephen.hill@xxxxxxxxxxxx> writes:

S> Any help would be appreciated.

Because test is an Array, and #puts do something different with an
Array. it make something like your method test#to_s (i.e. it execute a
loop)


Guy Decoux










<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise