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

ruby-changes:41997

From: nagachika <ko1@a...>
Date: Thu, 10 Mar 2016 00:20:27 +0900 (JST)
Subject: [ruby-changes:41997] nagachika:r54071 (ruby_2_2): merge revision(s) 51006, 53784: [Backport #11495]

nagachika	2016-03-10 00:20:20 +0900 (Thu, 10 Mar 2016)

  New Revision: 54071

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54071

  Log:
    merge revision(s) 51006,53784: [Backport #11495]
    
    * re.c: Update documentation for Regexp class.
      [fix GH-937][ci skip] Patch by @davydovanton
    
    * re.c: Remove deprecated kcode argument from Regexp.new and compile
      patch provided by Dylan Pulliam [Bug #11495]

  Modified directories:
    branches/ruby_2_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/re.c
    branches/ruby_2_2/version.h
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 54070)
+++ ruby_2_2/version.h	(revision 54071)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.5"
 #define RUBY_RELEASE_DATE "2016-03-10"
-#define RUBY_PATCHLEVEL 254
+#define RUBY_PATCHLEVEL 255
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_2/re.c
===================================================================
--- ruby_2_2/re.c	(revision 54070)
+++ ruby_2_2/re.c	(revision 54071)
@@ -1723,10 +1723,6 @@ match_array(VALUE match, int start) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/re.c#L1723
 }
 
 
-/* [MG]:FIXME: I put parens around the /.../.match() in the first line of the
-   second example to prevent the '*' followed by a '/' from ending the
-   comment. */
-
 /*
  *  call-seq:
  *     mtch.to_a   -> anArray
@@ -1742,7 +1738,7 @@ match_array(VALUE match, int start) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/re.c#L1738
  *  accessing the fields directly (as an intermediate array is
  *  generated).
  *
- *     all,f1,f2,f3 = *(/(.)(.)(\d+)(\d)/.match("THX1138."))
+ *     all,f1,f2,f3 = * /(.)(.)(\d+)(\d)/.match("THX1138.")
  *     all   #=> "HX1138"
  *     f1    #=> "H"
  *     f2    #=> "X"
@@ -2959,12 +2955,16 @@ rb_reg_match2(VALUE re) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/re.c#L2955
  *  If a block is given, invoke the block with MatchData if match succeed, so
  *  that you can write
  *
- *     pat.match(str) {|m| ...}
+ *     /M(.*)/.match("Matz") do |m|
+ *       puts m[0]
+ *       puts m[1]
+ *     end
  *
  *  instead of
  *
- *     if m = pat.match(str)
- *       ...
+ *     if m = /M(.*)/.match("Matz")
+ *       puts m[0]
+ *       puts m[1]
  *     end
  *
  *  The return value is a value from block execution in this case.
@@ -2999,16 +2999,15 @@ rb_reg_match_m(int argc, VALUE *argv, VA https://github.com/ruby/ruby/blob/trunk/ruby_2_2/re.c#L2999
 /*
  * Document-method: compile
  *
- * Synonym for <code>Regexp.new</code>
+ * Alias for <code>Regexp.new</code>
  */
 
-
 /*
  *  call-seq:
- *     Regexp.new(string, [options [, kcode]])        -> regexp
- *     Regexp.new(regexp)                            -> regexp
- *     Regexp.compile(string, [options [, kcode]])    -> regexp
- *     Regexp.compile(regexp)                        -> regexp
+ *     Regexp.new(string, [options])       -> regexp
+ *     Regexp.new(regexp)                  -> regexp
+ *     Regexp.compile(string, [options)    -> regexp
+ *     Regexp.compile(regexp)              -> regexp
  *
  *  Constructs a new regular expression from +pattern+, which can be either a
  *  String or a Regexp (in which case that regexp's options are propagated),
@@ -3019,9 +3018,6 @@ rb_reg_match_m(int argc, VALUE *argv, VA https://github.com/ruby/ruby/blob/trunk/ruby_2_2/re.c#L3018
  *  <em>or</em>-ed together.  Otherwise, if +options+ is not
  *  +nil+ or +false+, the regexp will be case insensitive.
  *
- *  When the +kcode+ parameter is `n' or `N' sets the regexp no encoding.
- *  It means that the regexp is for binary strings.
- *
  *    r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/
  *    r2 = Regexp.new('cat', true)     #=> /cat/i
  *    r3 = Regexp.new(r2)              #=> /cat/i
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 54070)
+++ ruby_2_2/ChangeLog	(revision 54071)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Thu Mar 10 00:17:57 2016  Zachary Scott  <zzak@r...>
+
+	* re.c: Remove deprecated kcode argument from Regexp.new and compile
+	  patch provided by Dylan Pulliam [Bug #11495]
+
+Thu Mar 10 00:17:57 2016  SHIBATA Hiroshi  <hsbt@r...>
+
+	* re.c: Update documentation for Regexp class.
+	  [fix GH-937][ci skip] Patch by @davydovanton
+
 Thu Mar 10 00:04:34 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/socket/socket.c (sock_gethostname): support unlimited size

Property changes on: ruby_2_2
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r51006,53784


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

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