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

debrew: restore ARGV even when IRB.setup raises

parent faa066b1
No related branches found
No related tags found
No related merge requests found
......@@ -6,9 +6,12 @@ module IRB
def IRB.start_within(binding)
unless @setup_done
# make IRB ignore our command line arguments
saved_args = ARGV.shift(ARGV.size)
IRB.setup(nil)
ARGV.concat(saved_args)
begin
saved_args = ARGV.shift(ARGV.size)
IRB.setup(nil)
ensure
ARGV.replace(saved_args)
end
@setup_done = true
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