From da1ba13714f0a1025e4e60ef50d477a2603c1a3a Mon Sep 17 00:00:00 2001 From: k0kubun Date: Tue, 12 Dec 2017 11:25:16 +0000 Subject: irb.rb: preserve ARGV on binding.irb This is not perfectly good solution (at least we don't want to have ARGV as default value of `argv` argument), but unfortunately IRB.setup and IRB.parse_opts are public methods and we can't make breaking change to those methods. We may deprecate using them and then make them private in the future, but the removal should not be in Ruby 2.5. So I kept their interface for now. [Bug #14162] [close GH-1770] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/irb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/irb.rb') diff --git a/lib/irb.rb b/lib/irb.rb index b07bc80c95..3a5fdbc698 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -704,7 +704,7 @@ end class Binding # :nodoc: def irb - IRB.setup(eval("__FILE__")) + IRB.setup(eval("__FILE__"), argv: []) workspace = IRB::WorkSpace.new(self) STDOUT.print(workspace.code_around_binding) IRB::Irb.new(workspace).run(IRB.conf) -- cgit v1.2.3