diff options
-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 |