Created
May 13, 2013 04:48
-
-
Save shunwen/5566215 to your computer and use it in GitHub Desktop.
Use default value in lambda
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
lambda { |*args| (args.first || default) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment