aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/debrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/debrew')
-rw-r--r--Library/Homebrew/debrew/irb.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/debrew/irb.rb b/Library/Homebrew/debrew/irb.rb
index c81e3cf4b..0e6790af9 100644
--- a/Library/Homebrew/debrew/irb.rb
+++ b/Library/Homebrew/debrew/irb.rb
@@ -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