summaryrefslogtreecommitdiff
path: root/kernel.rb
diff options
context:
space:
mode:
authorNithin Bekal <[email protected]>2024-10-01 22:51:00 -0400
committerNobuyoshi Nakada <[email protected]>2024-10-02 17:07:46 +0900
commitbae3d6813470bacbaac281616a07d9079697c882 ()
treead852c381465ba4da3d58e832d335f9f56422571 /kernel.rb
parent5eb7cbf4e3f96444ba6189ecf2d349f35747d5ce (diff)
[DOC] Remove repeated examples for Kernel#then
Notes: Merged: https://.com/ruby/ruby/pull/11758
-rw-r--r--kernel.rb9
1 files changed, 0 insertions, 9 deletions
@@ -118,15 +118,6 @@ module Kernel
# # does not meet condition, drop value
# 2.then.detect(&:odd?) # => nil
#
- # Good usage for +then+ is value piping in method chains:
- #
- # require 'open-uri'
- # require 'json'
- #
- # construct_url(arguments).
- # then {|url| URI(url).read }.
- # then {|response| JSON.parse(response) }
- #
def then
Primitive.attr! :inline_block
unless defined?(yield)