summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-20 03:26:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-20 03:26:19 +0000
commit2a50650ceb893ec7ea22bdab65a39dcc921bafe4 (patch)
treef0cb14e36d81f6bfb7feae631f23ffca11700fcc /lib/optparse.rb
parent47807a7b44ba98fa87d9cee83852c0f6dc7615e9 (diff)
* lib/optparse.rb: fix to override conv proc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r--lib/optparse.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 5013700ae2..0c4b484e02 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -1077,7 +1077,7 @@ class OptionParser
# 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_proc if pattern.respond_to?(:convert)
next
end
@@ -1090,7 +1090,7 @@ class OptionParser
when CompletingHash
when nil
pattern = CompletingHash.new
- conv ||= pattern.method(:convert).to_proc if pattern.respond_to?(:convert)
+ conv = pattern.method(:convert).to_proc if pattern.respond_to?(:convert)
else
raise ArgumentError, "argument pattern given twice"
end