Created
July 24, 2015 06:15
-
-
Save cheald/01820ce19baf867c9107 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "irb" | |
IRB.conf[:PROMPT_MODE] = :SIMPLE | |
IRB.conf[:USE_READLINE] = true | |
IRB.setup(nil) | |
workspace = IRB::WorkSpace.new(binding) | |
irb = IRB::Irb.new(workspace) | |
IRB.conf[:IRB_RC].call irb.context if IRB.conf[:IRB_RC] | |
IRB.conf[:MAIN_CONTEXT] = irb.context | |
trap("SIGINT") { irb.signal_handle } | |
catch(:IRB_EXIT) { irb.eval_input } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment