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

ruby-changes:54813

From: headius <ko1@a...>
Date: Fri, 8 Feb 2019 02:29:22 +0900 (JST)
Subject: [ruby-changes:54813] headius:r67032 (trunk): Replace outdated blockless proc call with block argument syntax

headius	2019-02-08 02:29:16 +0900 (Fri, 08 Feb 2019)

  New Revision: 67032

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

  Log:
    Replace outdated blockless proc call with block argument syntax

  Modified files:
    trunk/lib/tracer.rb
Index: lib/tracer.rb
===================================================================
--- lib/tracer.rb	(revision 67031)
+++ lib/tracer.rb	(revision 67032)
@@ -142,11 +142,11 @@ class Tracer https://github.com/ruby/ruby/blob/trunk/lib/tracer.rb#L142
     stdout.print "Trace off\n" if Tracer.verbose?
   end
 
-  def add_filter(p = proc) # :nodoc:
+  def add_filter(&p) # :nodoc:
     @filters.push p
   end
 
-  def set_get_line_procs(file, p = proc) # :nodoc:
+  def set_get_line_procs(file, &p) # :nodoc:
     @get_line_procs[file] = p
   end
 
@@ -248,7 +248,7 @@ class Tracer https://github.com/ruby/ruby/blob/trunk/lib/tracer.rb#L248
   #     puts "line number executed is #{line}"
   #   })
 
-  def Tracer.set_get_line_procs(file_name, p = proc)
+  def Tracer.set_get_line_procs(file_name, &p)
     Single.set_get_line_procs(file_name, p)
   end
 
@@ -261,7 +261,7 @@ class Tracer https://github.com/ruby/ruby/blob/trunk/lib/tracer.rb#L261
   #     "Kernel" == klass.to_s
   #   end
 
-  def Tracer.add_filter(p = proc)
+  def Tracer.add_filter(&p)
     Single.add_filter(p)
   end
 end

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

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