summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-06 02:53:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-06 02:53:25 +0000
commit493e48897421d176a8faf0f0820323d79ecdf94a (patch)
tree18495ac99da1fee26537e6898fbf6b6494413a97 /lib
parentaf3f52674ad7580346bf9a11617d4dbc9f5bcd61 (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
Diffstat (limited to 'lib')
-rw-r--r--lib/irb.rb8
1 files changed, 8 insertions, 0 deletions
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