From dc8147bca9715b114745ce8bea211fb40ec583cc Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 20 Apr 2007 03:26:19 +0000 Subject: [PATCH] * lib/optparse.rb: fix to override conv proc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/optparse.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b93143aefc..31ce18a727 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Apr 20 12:27:04 2007 Nobuyoshi Nakada + + * lib/optparse.rb: fix to override conv proc. + Fri Apr 20 12:21:28 2007 Nobuyoshi Nakada * eval.c (ruby_cleanup): fixed access to out of bound, and inversed diff --git a/lib/optparse.rb b/lib/optparse.rb index 1808487337..854805a82a 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1076,7 +1076,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