Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Strange argument error in Ruby 1.8.4 (2006-02-24
nicolas.pouillard
3/10/2006 9:37:00 AM
Hi there,
I found a strange difference somewhere between Ruby 1.8.4 (2005-12-24)
and Ruby 1.8.4 (2006-02-24).
Here the code:
h = {}
a = []
h['test'] ||= a.join 'c'
ArgumentError: wrong number of arguments (2 for 1)
from (irb):5:in `[]'
from (irb):5
To fix it, I add parenthesis like that:
h['test'] ||= a.join('c')
But I found it strange enough to ask the question.
Regards,
--
Nicolas Pouillard aka Ertai <ertai@feydakins.org>
http:...
Uttk -- Unified Test Tool Kit
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Strange argument error in Ruby 1.8.4 (2006-02-24
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