aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
authorstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-26 12:19:04 +0000
committerstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-26 12:19:04 +0000
commit905be736f7452f8bb52014f777a66ba6303fbcb7 (patch)
tree652b2b1d1da8d962d196c8e3835a64e5a55f663d /object.c
parent61cccab43645dd235025a83f8e845b8da315c472 (diff)
downloadruby-905be736f7452f8bb52014f777a66ba6303fbcb7.tar.gz
object.c: [DOC] fix typos in doc for yield_self
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/object.c b/object.c
index 949e52181c..cc1c75e639 100644
--- a/object.c
+++ b/object.c
@@ -570,15 +570,14 @@ rb_obj_size(VALUE self, VALUE args, VALUE obj)
* 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, VALUE obj)
* # 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
*
*/