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

ruby-changes:45832

From: naruse <ko1@a...>
Date: Sun, 12 Mar 2017 17:09:51 +0900 (JST)
Subject: [ruby-changes:45832] naruse:r57905 (ruby_2_4): merge revision(s) 57584: [Backport #13202]

naruse	2017-03-12 17:09:45 +0900 (Sun, 12 Mar 2017)

  New Revision: 57905

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

  Log:
    merge revision(s) 57584: [Backport #13202]
    
    [DOC] Update an obsolete example for slice_before.
    
    The argument for Enumerable#slice_before is is removed at Ruby 2.3.
    
    Reported by Shyouhei Urabe.  [Bug #13202]

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/enum.c
    branches/ruby_2_4/version.h
Index: ruby_2_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 57904)
+++ ruby_2_4/version.h	(revision 57905)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #define RUBY_VERSION "2.4.0"
 #define RUBY_RELEASE_DATE "2017-03-12"
-#define RUBY_PATCHLEVEL 62
+#define RUBY_PATCHLEVEL 63
 
 #define RUBY_RELEASE_YEAR 2017
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_4/enum.c
===================================================================
--- ruby_2_4/enum.c	(revision 57904)
+++ ruby_2_4/enum.c	(revision 57905)
@@ -3213,9 +3213,10 @@ slicebefore_i(RB_BLOCK_CALL_FUNC_ARGLIST https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L3213
  *
  *    # split mails in mbox (slice before Unix From line after an empty line)
  *    open("mbox") { |f|
- *      f.slice_before(emp: true) { |line, h|
- *        prevemp = h[:emp]
- *        h[:emp] = line == "\n"
+ *      emp = true
+ *      f.slice_before { |line|
+ *        prevemp = emp
+ *        emp = line == "\n"
  *        prevemp && line.start_with?("From ")
  *      }.each { |mail|
  *        mail.pop if mail.last == "\n"

Property changes on: ruby_2_4
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r57584


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

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