From: Radek Hnilica Date: 2002-11-29T21:18:28+09:00 Subject: inwoking irb from the middle of things Hello, i know that i can inwoke irb from middle of program, the smallest example is: iowa@moon:~/testing$ cat inwokeirb.rb #!/usr/bin/env ruby require 'irb' def main a = 5 IRB::start $STDIN puts "After IRB: a=#{a}" end main # EOF But I can't do anything useful from the irb session. What I want to do is look arround int variables and probably change their values. iowa@moon:~/testing$ ./inwokeirb.rb irb(main):001:0> p a NameError: undefined local variable or method `a' for # from (irb):1 irb(main):002:0> a = 2 => 2 irb(main):003:0> quit After IRB: a=5 # End of sesion In this time I'm living at the edge: iowa@moon:~/testing$ ruby -v ruby 1.7.3 (2002-11-27) [i686-linux] The nearest goal is to fiddle with ruby interactively in some checkpoints in the program. The far goal is to have fully interactive environment where in time of failure the program doesn't end but fires interactive session. Maybe I'm on the wrong road and have to go another direction. -- Radek Hnilica ======================================= No matter how far down the wrong road you've gone, turn back. Turkish proverb