Skip to content

Instantly share code, notes, and snippets.

@knzconnor
Created February 21, 2009 00:46
Show Gist options
  • Save knzconnor/67811 to your computer and use it in GitHub Desktop.
Save knzconnor/67811 to your computer and use it in GitHub Desktop.
call irb from script context
#stolen from http://pastie.org/395671 twitter:@seacreature. Just repo'ed here so I can find it again
require "irb"
IRB.setup(nil)
IRB.conf[:MAIN_CONTEXT] = IRB::Context.new(IRB::Irb.new)
require "irb/ext/multi-irb"
IRB.irb(nil,binding)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment