mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Prefer block_given? to iterator?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
17aeff3e77
commit
c20aae965e
6 changed files with 13 additions and 25 deletions
|
@ -147,7 +147,7 @@ class Shell
|
|||
# yorn: Boolean(@shell.debug? or @shell.verbose?)
|
||||
def notify(*opts)
|
||||
@shell.notify(*opts) do |mes|
|
||||
yield mes if iterator?
|
||||
yield mes if block_given?
|
||||
|
||||
mes.gsub!("%id", "#{@command}:##{@pid}")
|
||||
mes.gsub!("%name", "#{@command}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue