1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

prelude.rb: Binding#irb [ci skip]

* prelude.rb (Binding#irb): [EXPERIMENTAL] automatically require
  irb and run.  [ruby-core:78960] [Bug #13099]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-01-06 03:11:45 +00:00
parent 93824a5f73
commit 7802f01d4f
2 changed files with 8 additions and 0 deletions

View file

@ -708,6 +708,7 @@ end
class Binding
# :nodoc:
undef irb if method_defined?(:irb)
def irb
IRB.setup(eval("__FILE__"))
IRB::Irb.new(IRB::WorkSpace.new(self)).run(IRB.conf)

View file

@ -133,3 +133,10 @@ class IO
__write_nonblock(buf, exception)
end
end
class Binding
def irb
require 'irb'
irb
end
end