summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib/irb.rb8
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d1e95c93a5..d2842c155a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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