summaryrefslogtreecommitdiff
path: root/lib/irb.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 11:25:16 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 11:25:16 +0000
commitda1ba13714f0a1025e4e60ef50d477a2603c1a3a (patch)
tree04b8046c765f7d1cec10db66cf45945211422459 /lib/irb.rb
parent8d1d4e3164a095ed488fd07c2eb75fa084378ab7 (diff)
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
Diffstat (limited to 'lib/irb.rb')
-rw-r--r--lib/irb.rb2
1 files changed, 1 insertions, 1 deletions
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)