diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-06 02:53:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-06 02:53:25 +0000 |
commit | 493e48897421d176a8faf0f0820323d79ecdf94a (patch) | |
tree | 18495ac99da1fee26537e6898fbf6b6494413a97 | |
parent | af3f52674ad7580346bf9a11617d4dbc9f5bcd61 (diff) |
irb.rb: Binding#irb
* lib/irb.rb (Binding#irb): new method like Binding#pry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/irb.rb | 8 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Sun Nov 6 11:53:23 2016 Nobuyoshi Nakada <[email protected]> + + * lib/irb.rb (Binding#irb): new method like Binding#pry. + Sun Nov 6 11:48:55 2016 Shugo Maeda <[email protected]> * test/net/smtp/test_smtp.rb (test_tls_connect, test_tls_connect): diff --git a/lib/irb.rb b/lib/irb.rb index 869f5ad894..676abe42cd 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -705,3 +705,11 @@ module IRB array.join("\n") end end + +class Binding + # :nodoc: + def irb + IRB.setup(eval("__FILE__")) + IRB::Irb.new(IRB::WorkSpace.new(self)).run(IRB.conf) + end +end |