aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-24 14:05:19 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-24 14:05:19 -0700
commit04735c48ab44c97cbfd5a5cd37f9a1696e2f5a2b (patch)
tree3a0e3e5880f82fc5be8d2c6f982180263d309589 /object.c
parente1c991f8d783440411e5bf4faf3f0923cef4a0e1 (diff)
downloadruby-04735c48ab44c97cbfd5a5cd37f9a1696e2f5a2b.tar.gz
Minor documentation fixes [ci skip]
From zverok (Victor Shepelev) Fixes [Misc #16126]
Diffstat (limited to 'object.c')
-rw-r--r--object.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/object.c b/object.c
index 78665e039c..28b393d051 100644
--- a/object.c
+++ b/object.c
@@ -572,23 +572,23 @@ 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 value piping in method chains:
+ * Good usage for +then+ 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) }
+ * then {|url| open(url).read }.
+ * then {|response| JSON.parse(response) }
*
* When called without block, the method returns +Enumerator+,
* which can be used, for example, for conditional
* circuit-breaking:
*
* # meets condition, no-op
- * 1.yield_self.detect(&:odd?) # => 1
+ * 1.then.detect(&:odd?) # => 1
* # does not meet condition, drop value
- * 2.yield_self.detect(&:odd?) # => nil
+ * 2.then.detect(&:odd?) # => nil
*
*/