Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
execution problem in ruby
Pokkai Dokkai
8/10/2007 4:52:00 PM
how to execute a ruby program which is inside a string ?
for example
ex.rb
puts "start "
temp="(1..10).each do |count| print count end "
puts "end"
how to execute the source code in temp(String object)
--
Posted via
http://www.ruby-...
.
3 Answers
Sebastian Hungerecker
8/10/2007 5:13:00 PM
0
Pokkai Dokkai wrote:
> how to execute a ruby program which is inside a string ?
eval
--
NP: Katatonia - Right Into The Bliss
Jabber: sepp2k@jabber.org
ICQ: 205544826
dougal.s
8/10/2007 5:13:00 PM
0
On 10 Aug 2007, at 17:51, Pokkai Dokkai wrote:
>
> how to execute the source code in temp(String object)
eval(temp)
Hope this helps.
Douglas F Shearer
dougal.s@gmail.com
http://douglasfs...
Konrad Meyer
8/10/2007 7:33:00 PM
0
On Friday 10 August 2007 09:51:55 am Pokkai Dokkai wrote:
> how to execute a ruby program which is inside a string ?
> for example
> ex.rb
>
> puts "start "
> temp="(1..10).each do |count| print count end "
> puts "end"
>
>
> how to execute the source code in temp(String object)
eval(string), but this is always what NOT-WHAT-YOU-WANT-TO-DO.
--
Konrad Meyer <konrad@tylerc.org>
http://konrad.sobertil...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
execution problem in ruby
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