[前][次][番号順一覧][スレッド一覧]

ruby-changes:44551

From: nobu <ko1@a...>
Date: Sun, 6 Nov 2016 11:53:29 +0900 (JST)
Subject: [ruby-changes:44551] nobu:r56624 (trunk): irb.rb: Binding#irb

nobu	2016-11-06 11:53:25 +0900 (Sun, 06 Nov 2016)

  New Revision: 56624

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56624

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

  Modified files:
    trunk/ChangeLog
    trunk/lib/irb.rb
Index: lib/irb.rb
===================================================================
--- lib/irb.rb	(revision 56623)
+++ lib/irb.rb	(revision 56624)
@@ -705,3 +705,11 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb.rb#L705
     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
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 56623)
+++ ChangeLog	(revision 56624)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Nov  6 11:53:23 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/irb.rb (Binding#irb): new method like Binding#pry.
+
 Sun Nov  6 11:48:55 2016  Shugo Maeda  <shugo@r...>
 
 	* test/net/smtp/test_smtp.rb (test_tls_connect, test_tls_connect):

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]