method
yield_self
ruby latest stable - Class:
Object
yield_self()public
Yields self to the block and returns the result of the block.
"my string".yield_self {|s| s.upcase } #=> "MY STRING" 3.next.yield_self {|x| x**x }.to_s #=> "256"
yield_self()Yields self to the block and returns the result of the block.
"my string".yield_self {|s| s.upcase } #=> "MY STRING" 3.next.yield_self {|x| x**x }.to_s #=> "256"