Starting an IRB session inside a Ruby script

suggest change

As of Ruby 2.4.0, you can start an interactive IRB session inside any Ruby script using these lines:

require 'irb'
binding.irb

This starts an IRB session with the current self, local variables, and instance variables. Type Ctrl+D or quit to resume the program.

This can be very useful for debugging.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents