Last active
April 1, 2019 11:09
-
-
Save jenny-codes/92c848dcc27cd3af334466a38bac66e7 to your computer and use it in GitHub Desktop.
This file contains 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 missing_arguments(block) | |
block.call('arg1', 'arg2') | |
end | |
a_proc = Proc.new { |a, b, c| "a_proc outputs #{a} & #{b} & #{c}" } | |
a_lambda = lambda { |a, b, c| "a_lambda output #{a} & #{b} & #{c}" } | |
puts missing_arguments(a_proc) | |
puts missing_arguments(a_lambda) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
result