Ruby - update running script

Viewed 301

Is it possible to break a currently running Ruby script, update it, and then continue running it?

E.g. say you had the script:

(0..10).each do |x|
   puts x
end 

could you interrupt it, modify it so the 2nd line read:

   puts x * 2

then continue execution?

(assuming we ignore trivial arguments like the interrupt time being too short)

2 Answers
Related