Created
July 27, 2008 00:56
-
-
Save yosmoc/2705 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 default_value | |
p 'generate default_value' | |
'default value' | |
end | |
def some_method(param = nil) | |
param ||= default_value | |
p param | |
end | |
some_method | |
some_method('hello') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment