Skip to content

Commit

Permalink
Replace outdated blockless proc call with block argument syntax
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
headius committed Feb 7, 2019
1 parent 7132795 commit e6f8382
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/tracer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ def off # :nodoc:
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

Expand Down Expand Up @@ -248,7 +248,7 @@ def Tracer.off
# 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

Expand All @@ -261,7 +261,7 @@ def Tracer.set_get_line_procs(file_name, p = proc)
# "Kernel" == klass.to_s
# end

def Tracer.add_filter(p = proc)
def Tracer.add_filter(&p)
Single.add_filter(p)
end
end
Expand Down

0 comments on commit e6f8382

Please sign in to comment.