Silence method redefinition warning
This commit is contained in:
parent
f3e4b563d4
commit
b149580632
@ -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)
|
||||
|
||||
@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
|
||||
def start_within(binding)
|
||||
unless @setup_done
|
||||
setup(nil)
|
||||
@setup_done = true
|
||||
end
|
||||
|
||||
workspace = WorkSpace.new(binding)
|
||||
irb = Irb.new(workspace)
|
||||
|
||||
@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
|
||||
end
|
||||
ensure
|
||||
irb_at_exit
|
||||
end
|
||||
ensure
|
||||
irb_at_exit
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user