Skip to content
Snippets Groups Projects
Commit b1495806 authored by Jack Nagel's avatar Jack Nagel
Browse files

Silence method redefinition warning

parent f3e4b563
No related branches found
No related tags found
No related merge requests found
......@@ -3,31 +3,33 @@ require 'irb'
module IRB
@setup_done = false
def IRB.parse_opts
end
def IRB.start_within(binding)
unless @setup_done
IRB.setup(nil)
@setup_done = true
extend Module.new {
def parse_opts
end
workspace = WorkSpace.new(binding)
irb = Irb.new(workspace)
def start_within(binding)
unless @setup_done
setup(nil)
@setup_done = true
end
@CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
@CONF[:MAIN_CONTEXT] = irb.context
workspace = WorkSpace.new(binding)
irb = Irb.new(workspace)
trap("SIGINT") do
irb.signal_handle
end
@CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
@CONF[:MAIN_CONTEXT] = irb.context
trap("SIGINT") do
irb.signal_handle
end
begin
catch(:IRB_EXIT) do
irb.eval_input
begin
catch(:IRB_EXIT) do
irb.eval_input
end
ensure
irb_at_exit
end
ensure
irb_at_exit
end
end
}
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment