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

ruby-changes:59414

From: Marcus <ko1@a...>
Date: Mon, 23 Dec 2019 22:56:41 +0900 (JST)
Subject: [ruby-changes:59414] de1a462454 (master): NEWS: revise grammar, language, markup, etc.

https://git.ruby-lang.org/ruby.git/commit/?id=de1a462454

From de1a462454f4196490263c9be8be16a44513f5a0 Mon Sep 17 00:00:00 2001
From: Marcus Stollsteimer <sto.mar@w...>
Date: Mon, 23 Dec 2019 14:45:24 +0100
Subject: NEWS: revise grammar, language, markup, etc.


diff --git a/NEWS b/NEWS
index cba1b1f..a71feac 100644
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,7 @@ releases except for bug fixes. https://github.com/ruby/ruby/blob/trunk/NEWS#L8
 Note that each entry is kept so brief that no reason behind or reference
 information is supplied with.  For a full list of changes with all
 sufficient information, see the ChangeLog file or Redmine
-(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
+(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>).
 
 == Changes since the 2.6.0 release
 
@@ -53,9 +53,9 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L53
     JSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: "Charlie", age: age}]}
     #=> NoMatchingPatternError
 
-* See the following slides in detail
+* See the following slides for more details:
   * https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7
-  * Note that the slides are slightly obsolete
+  * Note that the slides are slightly obsolete.
 
 ==== The spec of keyword arguments is changed towards 3.0
 
@@ -128,14 +128,16 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L128
     h = {}; def foo(*a) a end; foo(h)   # [{}]
     h = {}; def foo(a) a end; foo(h)    # {}
 
-==== Numbered parameter
+==== Numbered parameters
 
-* Numbered parameter as the default block parameter is introduced as an
-  experimental feature.  [Feature #4475]
+* Numbered parameters as default block parameters are introduced
+  as an experimental feature.  [Feature #4475]
 
-    [1, 2, 10].map { _1.to_s(16) } #=> ["1", "2", "a"]
+    [1, 2, 10].map { _1.to_s(16) }    #=> ["1", "2", "a"]
+    [[1, 2], [3, 4]].map { _1 + _2 }  #=> [3, 7]
 
-  You can still define a local variable named _1 and so on, and that is honored when present, but renders warning.
+  You can still define a local variable named +_1+ and so on,
+  and that is honored when present, but renders a warning.
 
     _1 = 0            #=> warning: `_1' is reserved for numbered parameter; consider another name
     [1].each { p _1 } # prints 0 instead of 1
@@ -165,13 +167,13 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L167
      ary[..3]  # identical to ary[0..3]
      where(sales: ..100)
 
-* Setting <code>$;</code> to non-nil value is warned now.  Use of it in
-  String#split is warned too.
+* Setting <code>$;</code> to a non-nil value is warned now.
+  Use of it in String#split is warned too.
 
-* Setting <code>$,</code> to non-nil value is warned now.  Use of it in
-  Array#join is warned too.
+* Setting <code>$,</code> to a non-nil value is warned now.
+  Use of it in Array#join is warned too.
 
-* Quoted here-document identifier must end within the same line.
+* Quoted here-document identifiers must end within the same line.
 
      <<"EOS
      " # This had been warned since 2.4; Now it raises a SyntaxError
@@ -185,7 +187,7 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L187
       # .bar
       .baz # => foo.baz
 
-* Calling a private method with a literal <code>self</code> as the receiver
+* Calling a private method with a literal +self+ as the receiver
   is now allowed. [Feature #11297] [Feature #16123]
 
 * Modifier rescue now operates the same for multiple assignment as single
@@ -195,7 +197,7 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L197
     # Previously parsed as: (a, b = raise) rescue [1, 2]
     # Now parsed as:         a, b = (raise rescue [1, 2])
 
-* +yield+ in singleton class syntax is warned and will be deprecated later [Feature #15575].
+* +yield+ in singleton class syntax is warned and will be deprecated later. [Feature #15575].
 
    def foo
      class << Object.new
@@ -212,7 +214,8 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L214
 
   All arguments to +foo+ are forwarded to +bar+, including keyword and
   block arguments.
-  Note that the parentheses are mandatory.  `bar ...` is parsed as an endless range.
+  Note that the parentheses are mandatory.  <code>bar ...</code> is parsed
+  as an endless range.
 
 * Access and setting of <code>$SAFE</code> is now always warned. <code>$SAFE</code>
   will become a normal global variable in Ruby 3.0. [Feature #16131]
@@ -230,8 +233,7 @@ Array:: https://github.com/ruby/ruby/blob/trunk/NEWS#L233
 
     * Added Array#intersection. [Feature #16155]
 
-    * Added Array#minmax, with a faster implementation than Enumerable#minmax.
-      [Bug #15929]
+    * Added Array#minmax, with a faster implementation than Enumerable#minmax. [Bug #15929]
 
 Comparable::
 
@@ -247,7 +249,8 @@ Complex:: https://github.com/ruby/ruby/blob/trunk/NEWS#L249
 
   New method::
 
-    * Added Complex#<=>. So 0 <=> 0i will not raise NoMethodError. [Bug #15857]
+    * Added Complex#<=>.
+      So <code>0 <=> 0i</code> will not raise NoMethodError. [Bug #15857]
 
 Dir::
 
@@ -260,7 +263,7 @@ Encoding:: https://github.com/ruby/ruby/blob/trunk/NEWS#L263
 
   New encoding::
 
-    * Added new encoding CESU-8 [Feature #15931]
+    * Added new encoding CESU-8. [Feature #15931]
 
 Enumerable::
 
@@ -278,12 +281,12 @@ Enumerator:: https://github.com/ruby/ruby/blob/trunk/NEWS#L281
 
   New methods::
 
-    * Added Enumerator.produce to generate Enumerator from any custom
-      data-transformation.  [Feature #14781]
+    * Added Enumerator.produce to generate an Enumerator from any custom
+      data transformation.  [Feature #14781]
 
-        require 'date'
+        require "date"
         dates = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of dates
-        dates.detect(&:tuesday?) #=> next tuesday
+        dates.detect(&:tuesday?) #=> next Tuesday
 
     * Added Enumerator::Lazy#eager that generates a non-lazy enumerator
       from a lazy enumerator.  [Feature #15901]
@@ -308,7 +311,7 @@ File:: https://github.com/ruby/ruby/blob/trunk/NEWS#L311
 
   Modified method::
 
-    * File.extname now returns a dot string at a name ending with a dot on
+    * File.extname now returns a dot string for names ending with a dot on
       non-Windows platforms.  [Bug #15267]
 
           File.extname("foo.") #=> "."
@@ -317,8 +320,8 @@ FrozenError:: https://github.com/ruby/ruby/blob/trunk/NEWS#L320
 
   New method::
 
-    * Added FrozenError#receiver to return the frozen object that
-      modification was attempted on.  To set this object when raising
+    * Added FrozenError#receiver to return the frozen object on which
+      modification was attempted.  To set this object when raising
       FrozenError in Ruby code, FrozenError.new accepts a +:receiver+
       option.  [Feature #15751]
 
@@ -344,18 +347,18 @@ Integer:: https://github.com/ruby/ruby/blob/trunk/NEWS#L347
 
   Modified method::
 
-    * Integer#[] now supports range operation.  [Feature #8842]
+    * Integer#[] now supports range operations.  [Feature #8842]
 
          0b01001101[2, 4]  #=> 0b0011
          0b01001100[2..5]  #=> 0b0011
          0b01001100[2...6] #=> 0b0011
-             ^^^^
+         #   ^^^^
 
 Method::
 
   Modified method::
 
-    * Method#inspect shows much information. [Feature #14145]
+    * Method#inspect shows more information. [Feature #14145]
 
 Module::
 
@@ -371,7 +374,7 @@ Module:: https://github.com/ruby/ruby/blob/trunk/NEWS#L374
 
   Modified methods::
 
-    * Module#autoload? now takes an +inherit+ optional argument, like as
+    * Module#autoload? now takes an +inherit+ optional argument, like
       Module#const_defined?.  [Feature #15777]
 
     * Module#name now always returns a frozen String. The returned String is
@@ -426,13 +429,13 @@ String:: https://github.com/ruby/ruby/blob/trunk/NEWS#L429
     * Update Unicode version to 12.1.0, adding support for
       U+32FF SQUARE ERA NAME REIWA.  [Feature #15195]
 
-    * Update Unicode Emoji version to 12.1 [Feature #16272]
+    * Update Unicode Emoji version to 12.1. [Feature #16272]
 
 Symbol::
 
   New methods::
 
-    * Added Symbol#start_with? and Symbol#end_with? method.  [Feature #16348]
+    * Added Symbol#start_with? and Symbol#end_with? methods.  [Feature #16348]
 
 Time::
 
@@ -444,8 +447,8 @@ Time:: https://github.com/ruby/ruby/blob/trunk/NEWS#L447
 
   Modified method::
 
-    * Time#inspect is separated from Time#to_s and it shows its sub
-      second.  [Feature #15958]
+    * Time#inspect is separated from Time#to_s and it shows
+      the time's sub second.  [Feature #15958]
 
 UnboundMethod::
 
@@ -456,7 +459,7 @@ UnboundMethod:: https://github.com/ruby/ruby/blob/trunk/NEWS#L459
       <code>umethod.bind_call(obj, ...)</code> is semantically equivalent
       to <code>umethod.bind(obj).call(...)</code>.  This idiom is used in
       some libraries to call a method that is overridden.  The added
-      method does the same without allocation of intermediate Method
+      method does the same without allocation of an intermediate Method
       object.
 
           class Foo
@@ -477,10 +480,10 @@ UnboundMethod:: https://github.com/ruby/ruby/blob/trunk/NEWS#L480
 
 Warning::
 
-  New method::
+  New methods::
 
-    * Added Warning.[] and Warning.[]= to manage emit/suppress some categories of
-      warnings.  [Feature #16345]
+    * Added Warning.[] and Warning.[]= to manage emit/suppress of
+      some categories of warnings.  [Feature #16345]
 
 $LOAD_PATH::
 
@@ -492,13 +495,13 @@ $LOAD_PATH:: https://github.com/ruby/ruby/blob/trunk/NEWS#L495
 
 Bundler::
 
-  * Upgrade to Bundler 2.1.0
+  * Upgrade to Bundler 2.1.0.
     See https:// (... truncated)

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

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