Created
August 24, 2018 14:00
-
-
Save mehdi-farsi/3daa47f0b80f090851bc51a4f653fc7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def yield_with_return_value | |
hello_world = yield | |
puts hello_world | |
end | |
yield_with_return_value { "Hello World!" } # => Hello World! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment