[前][次][番号順一覧][スレッド一覧]

ruby-changes:15807

From: naruse <ko1@a...>
Date: Tue, 11 May 2010 22:08:05 +0900 (JST)
Subject: [ruby-changes:15807] Ruby:r27738 (trunk): Add description about Regexp(str, opt, lang).

naruse	2010-05-11 22:06:54 +0900 (Tue, 11 May 2010)

  New Revision: 27738

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27738

  Log:
    Add description about Regexp(str, opt, lang). [ruby-core:29893]

  Modified files:
    trunk/re.c

Index: re.c
===================================================================
--- re.c	(revision 27737)
+++ re.c	(revision 27738)
@@ -2836,9 +2836,9 @@
 
 /*
  *  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 @@
  *  <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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]