зеркало из https://github.com/github/ruby.git
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:
Родитель
93824a5f73
Коммит
7802f01d4f
|
@ -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)
|
||||
|
|
|
@ -133,3 +133,10 @@ class IO
|
|||
__write_nonblock(buf, exception)
|
||||
end
|
||||
end
|
||||
|
||||
class Binding
|
||||
def irb
|
||||
require 'irb'
|
||||
irb
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче