ruby/ruby — pull request #82 by msgerbush (2012-01-11 22:25:51+00:00)
Title: Optparse passes incorrect options when casting to a Regexp

In the optparse library, the incorrect regular expression is used to extract the encoding options when casting an argument to a `Regexp`. This results in the wrong options being passed as the third argument of `Regexp.new`.

`optparse.rb:1714: warning: encoding option is ignored - %s` is thrown when valid options are passed as an argument, even though the options `i`, `m`, and `x` are correctly interpreted. Also, the encoding of a Regexp argument cannot be set.