diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-16 07:42:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-16 07:42:01 +0000 |
commit | de1e4881d4c29e71086e9885c7f1a48452aa6780 (patch) | |
tree | 24a58cd5f1ca80df5129966ae11cff5d717d56ee /lib/optparse.rb | |
parent | 688d00d23b9280d75a75c129382408a057c7109d (diff) |
* lib/optparse.rb (Regexp): fix incorrect options when casting to
a Regexp, and suppress encoding option warnings.
https://github.com/ruby/ruby/pull/82
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r-- | lib/optparse.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index 79a95c1462..a448459d46 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1709,7 +1709,8 @@ XXX f |= Regexp::IGNORECASE if /i/ =~ o f |= Regexp::MULTILINE if /m/ =~ o f |= Regexp::EXTENDED if /x/ =~ o - k = o.delete("^imx") + k = o.delete("imx") + k = nil if k.empty? end Regexp.new(s || all, f, k) end |