Skip to content

Commit

Permalink
irb.rb: Binding#irb
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Nov 6, 2016
1 parent af3f526 commit 493e488
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Sun Nov 6 11:53:23 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>

* lib/irb.rb (Binding#irb): new method like Binding#pry.

Sun Nov 6 11:48:55 2016 Shugo Maeda <shugo@ruby-lang.org>

* test/net/smtp/test_smtp.rb (test_tls_connect, test_tls_connect):
Expand Down
8 changes: 8 additions & 0 deletions lib/irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -705,3 +705,11 @@ def @CONF.inspect
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

0 comments on commit 493e488

Please sign in to comment.