summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r--lib/optparse.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 54a92ceff2..cdc8ce4468 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -222,7 +222,7 @@ Individual switch class.
=end #'#"#`#
def parse(arg, *val)
if block
- val = conv.yield(*val) if conv
+ val = conv.call(*val) if conv
return arg, block, val
else
return arg, nil
@@ -1117,7 +1117,7 @@ Default options, which never appear in option summary.
end
begin
opt, sw, val = sw.parse(rest, argv) {|*exc| raise(*exc)}
- sw.yield(val) if sw
+ sw.call(val) if sw
rescue ParseError
raise $!.set_option(arg, rest)
end
@@ -1146,7 +1146,7 @@ Default options, which never appear in option summary.
opt, sw, val = sw.parse(val, argv) {|*exc| raise(*exc) if eq}
raise InvalidOption, arg if has_arg and !eq and arg == "-#{opt}"
argv.unshift(opt) if opt and (opt = opt.sub(/\A-*/, '-')) != '-'
- sw.yield(val) if sw
+ sw.call(val) if sw
rescue ParseError
raise $!.set_option(arg, has_arg)
end