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 cdc8ce44684..f9d059cd296 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -403,7 +403,7 @@ summary feature.
pat = t if t.respond_to?(:match)
end
unless block
- block = pat.method(:convert).to_proc if pat.respond_to?(:convert)
+ block = pat.method(:convert).to_block if pat.respond_to?(:convert)
end
@atype[t] = [pat, block]
end
@@ -938,7 +938,7 @@ Default options, which never appear in option summary.
# directly specified pattern(any object possible to match)
if !(String === o) and o.respond_to?(:match)
pattern = notwice(o, pattern, 'pattern')
- conv = (pattern.method(:convert).to_proc if pattern.respond_to?(:convert))
+ conv = (pattern.method(:convert).to_block if pattern.respond_to?(:convert))
next
end
@@ -951,7 +951,7 @@ Default options, which never appear in option summary.
when CompletingHash
when nil
pattern = CompletingHash.new
- conv = (pattern.method(:convert).to_proc if pattern.respond_to?(:convert))
+ conv = (pattern.method(:convert).to_block if pattern.respond_to?(:convert))
else
raise ArgumentError, "argument pattern given twice"
end