Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: "1".to_i *2 == 1 && "1".to_i*2 == 2 ?
Eric Hodel
9/30/2006 7:38:00 PM
On Sep 29, 2006, at 4:47 PM, Giovanni Intini wrote:
> Can anyone explain to me why
>
> "1".to_i*2 is equal to 2
> and
> "1".to_i *2 is equale to 1?
This is why you should run with -w as often as possible:
$ ruby -w
"1".to_i *2
-:1: warning: `*' interpreted as argument prefix
--
Eric Hodel - drbrain@segment7.net -
http://blog.se...
This implementation is HODEL-HASH-9600 compliant
http://trackmap.rob...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: "1".to_i *2 == 1 && "1".to_i*2 == 2 ?
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