summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheadius <headius@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-07 17:29:16 +0000
committerheadius <headius@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-07 17:29:16 +0000
commite6f8382a766a4e27e008d8cf753c6589a3eb6f85 (patch)
treee15d4d0969e3fa913cca568a3607c53463762c79
parent713279550ad33836e5d7bbbb5b801aa13def24dc (diff)
Replace outdated blockless proc call with block argument syntax
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/tracer.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tracer.rb b/lib/tracer.rb
index e463ae1467a..e5d2a3479b0 100644
--- a/lib/tracer.rb
+++ b/lib/tracer.rb
@@ -142,11 +142,11 @@ class Tracer
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
# 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
# "Kernel" == klass.to_s
# end
- def Tracer.add_filter(p = proc)
+ def Tracer.add_filter(&p)
Single.add_filter(p)
end
end