Skip to content

Instantly share code, notes, and snippets.

@brgnepal
Created June 25, 2014 03:24
Show Gist options
  • Save brgnepal/80299aa64c1e20f0842c to your computer and use it in GitHub Desktop.
Save brgnepal/80299aa64c1e20f0842c to your computer and use it in GitHub Desktop.
Lambda and Proc Return Behavior
def lambda_test
lam = lambda { return }
lam.call
puts "Hello world"
end
puts "Lambda Test : #{lambda_test }"
def proc_test
proc = Proc.new { return }
proc.call
puts "Hello world"
end
proc_test
puts "Proc Test : #{proc_test }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment