1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

NEWS: fixed markups and formatting [ci skip]

* got rid of inadvertent label lists.
* marked up resolve_feature_path method names.
* fixed indentation of UnboundMethod#bind_call and marked up as
  RDoc.
This commit is contained in:
Nobuyoshi Nakada 2019-09-27 00:48:48 +09:00
parent 876c5fe1b2
commit 617fa3049a
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

53
NEWS
View file

@ -198,16 +198,16 @@ RubyVM::
Removed method:: Removed method::
* RubyVM.resolve_feature_path moved to * +RubyVM.resolve_feature_path+ moved to
$LOAD_PATH.resolve_feature_path. [Feature #15903] [Feature #15230] <code>$LOAD_PATH.resolve_feature_path</code>. [Feature #15903] [Feature #15230]
Symbol:: Symbol::
Modified method:: Modified method::
* Symbol#to_s now always returns a frozen String. The returned String is * Symbol#to_s now always returns a frozen String. The returned String
always the same for a given Symbol. This change is experimental. is always the same for a given Symbol. This change is
[Feature #16150] experimental. [Feature #16150]
Time:: Time::
@ -219,8 +219,8 @@ Time::
Modified method:: Modified method::
* Time#inspect is separated from Time#to_s and it shows its sub second. * Time#inspect is separated from Time#to_s and it shows its sub
[Feature #15958] second. [Feature #15958]
UnboundMethod:: UnboundMethod::
@ -228,33 +228,34 @@ UnboundMethod::
* Added UnboundMethod#bind_call method. [Feature #15955] * Added UnboundMethod#bind_call method. [Feature #15955]
`umethod.bind_call(obj, ...)` is semantically equivalent to <code>umethod.bind_call(obj, ...)</code> is semantically equivalent
`umethod.bind(obj).call(...)`. This idiom is used in some libraries to to <code>umethod.bind(obj).call(...)</code>. This idiom is used in
call a method that is overridden. The added method does the same some libraries to call a method that is overridden. The added
without allocation of intermediate Method object. method does the same without allocation of intermediate Method
object.
class Foo class Foo
def add_1(x) def add_1(x)
x + 1 x + 1
end end
end end
class Bar < Foo class Bar < Foo
def add_1(x) # override def add_1(x) # override
x + 2 x + 2
end end
end end
obj = Bar.new obj = Bar.new
p obj.add_1(1) #=> 3 p obj.add_1(1) #=> 3
p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2 p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2
p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2 p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2
$LOAD_PATH:: $LOAD_PATH::
New method:: New method::
* Added $LOAD_PATH.resolve_feature_path. [Feature #15903] [Feature #15230] * Added <code>$LOAD_PATH.resolve_feature_path</code>. [Feature #15903] [Feature #15230]
=== Stdlib updates (outstanding ones only) === Stdlib updates (outstanding ones only)