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

ruby-changes:15820

From: naruse <ko1@a...>
Date: Wed, 12 May 2010 16:12:41 +0900 (JST)
Subject: [ruby-changes:15820] Ruby:r27753 (ruby_1_9_2): * re.c (rb_reg_initialize_m): fix wrong index for the lang

naruse	2010-05-12 16:12:33 +0900 (Wed, 12 May 2010)

  New Revision: 27753

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

  Log:
    * re.c (rb_reg_initialize_m): fix wrong index for the lang
      option's value 'N'. reported by Masaya TARUI via IRC.

  Modified files:
    branches/ruby_1_9_2/re.c

Index: ruby_1_9_2/re.c
===================================================================
--- ruby_1_9_2/re.c	(revision 27752)
+++ ruby_1_9_2/re.c	(revision 27753)
@@ -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/

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