aboutsummaryrefslogtreecommitdiffstats
path: root/lib/shell/command-processor.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-18 09:52:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-18 09:52:50 +0000
commitc20aae965e2e79fcf4c443b266f7012157d5b23b (patch)
tree3b1e6cbcd51d732d05bfd3273c0024c8a9658369 /lib/shell/command-processor.rb
parent17aeff3e77e6fe0d37a9943dd93bcb16c4bb9f66 (diff)
downloadruby-c20aae965e2e79fcf4c443b266f7012157d5b23b.tar.gz
Prefer block_given? to iterator?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/shell/command-processor.rb')
-rw-r--r--lib/shell/command-processor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb
index 00357e06fd..5fe6056560 100644
--- a/lib/shell/command-processor.rb
+++ b/lib/shell/command-processor.rb
@@ -343,7 +343,7 @@ class Shell
# %pwd, %cwd -> @pwd
def notify(*opts)
Shell.notify(*opts) {|mes|
- yield mes if iterator?
+ yield mes if block_given?
mes.gsub!("%pwd", "#{@cwd}")
mes.gsub!("%cwd", "#{@cwd}")
@@ -437,7 +437,7 @@ class Shell
ali = ali.id2name if ali.kind_of?(Symbol)
command = command.id2name if command.kind_of?(Symbol)
begin
- if iterator?
+ if block_given?
@alias_map[ali.intern] = proc
eval((d = %Q[def #{ali}(*opts)