ruby-changes:53163
From: stomar <ko1@a...>
Date: Fri, 26 Oct 2018 21:19:14 +0900 (JST)
Subject: [ruby-changes:53163] stomar:r65377 (trunk): object.c: [DOC] fix typos in doc for yield_self
stomar 2018-10-26 21:19:04 +0900 (Fri, 26 Oct 2018) New Revision: 65377 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65377 Log: object.c: [DOC] fix typos in doc for yield_self Modified files: trunk/object.c Index: object.c =================================================================== --- object.c (revision 65376) +++ object.c (revision 65377) @@ -570,15 +570,14 @@ rb_obj_size(VALUE self, VALUE args, VALU https://github.com/ruby/ruby/blob/trunk/object.c#L570 * 3.next.then {|x| x**x }.to_s #=> "256" * "my string".yield_self {|s| s.upcase } #=> "MY STRING" * - * Good usage for +yield_self+ is values piping in long method - * chains: + * Good usage for +yield_self+ is value piping in method chains: * * require 'open-uri' * require 'json' * * construct_url(arguments). - * yield_self { |url| open(url).read }. - * yield_self { |response| JSON.parse(response) } + * yield_self {|url| open(url).read }. + * yield_self {|response| JSON.parse(response) } * * When called without block, the method returns +Enumerator+, * which can be used, for example, for conditional @@ -587,7 +586,7 @@ rb_obj_size(VALUE self, VALUE args, VALU https://github.com/ruby/ruby/blob/trunk/object.c#L586 * # meets condition, no-op * 1.yield_self.detect(&:odd?) # => 1 * # does not meet condition, drop value - * 2.yeild_self.detect(&:odd?) # => nil + * 2.yield_self.detect(&:odd?) # => nil * */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/