summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-11 13:06:54 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-11 13:06:54 +0000
commitf65aac7a904ea88dc5f84420d701d4249e059390 (patch)
treece0a43d20ab9ad2591c542fdc91ed4d3fb4058ef /re.c
parentcbeafa71908cf51548be219f8bcee034a4bdbcf0 (diff)
Add description about Regexp(str, opt, lang). [ruby-core:29893]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/re.c b/re.c
index 2789120..b1e5c1d 100644
--- a/re.c
+++ b/re.c
@@ -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