How to run IRB.start in context of current class
问题 I've been just going through PragProg Continuous Testing With Ruby , where they talk about invoking IRB in context of current class to inspect the code manually. However, they quote that if you invoke IRB.start in a class, self is predefined, and refers to the object we were in when start was called which isn't true in my case. Even for very simple example like a = "hello" require 'irb' ARGV.clear # otherwise all script parameters get passed to IRB IRB.start When I try to access the a