Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: with and without Song#to_s again
Li Chen
12/30/2006 5:54:00 PM
--- Phrogz <gavin@refinery.com> wrote:
you can find this answer yourself.
> 1) Open a console and type:
> ri Kernel.puts
>
> 2) See that it says that it's the same as
> $stdout.puts. Type:
> ri IO.puts
>
> 3) See that it says that it does the same thing as
> print does. Type:
> ri IO.print
>
> 4) See that it tells you that it calls the to_s
> method of any objects
> that aren't strings.
Thank you for the detail explanation. Now I understand
why #to_s is called.
Li
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: with and without Song#to_s again
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password