Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
what's the diff between puts y and puts "#{y}" in class_eval
Raj Singh
1/28/2008 7:23:00 AM
Look at the code.
y = " another hi"
class Wes
end
Wes.class_eval <<-END
def hello
puts "#{y}"
puts y # I get wrong number of arguments error
end
END
While puts "#{y}" works puts y fails. And I am not sure what's the
explanation.
Any thoughts.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
what's the diff between puts y and puts "#{y}" in class_eval
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