diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 07:12:33 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 07:12:33 +0000 |
commit | fcb52106df9369b7719e4334907e50cf932be57f (patch) | |
tree | e3de82e9f8cc5c51be6a5439ddf58cdd5eb8ee8e /re.c | |
parent | 25c7c4a4ded9be28d60c333743e98087c19e3858 (diff) |
* re.c (rb_reg_initialize_m): fix wrong index for the lang
option's value 'N'. reported by Masaya TARUI via IRC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2836,9 +2836,9 @@ rb_reg_match_m(int argc, VALUE *argv, VALUE re) /* * call-seq: - * Regexp.new(string [, options]) => regexp + * Regexp.new(string [, options] [, lang]) => regexp * Regexp.new(regexp) => regexp - * Regexp.compile(string [, options]) => regexp + * Regexp.compile(string [, options] [, lang]) => regexp * Regexp.compile(regexp) => regexp * * Constructs a new regular expression from <i>pattern</i>, which can be either @@ -2849,6 +2849,7 @@ rb_reg_match_m(int argc, VALUE *argv, VALUE re) * <code>Regexp::IGNORECASE</code>, and <code>Regexp::MULTILINE</code>, * <em>or</em>-ed together. Otherwise, if <i>options</i> is not * <code>nil</code>, the regexp will be case insensitive. + * When the <i>lang</i> parameter is `n' or `N' sets the regexp no encoding. * * r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/ * r2 = Regexp.new('cat', true) #=> /cat/i |