Created
September 29, 2013 23:46
-
-
Save dwarring/6757601 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
# In the following Ruby code `xx -5` is treated as a method call, | |
# `yy -5` as an arithmetic expression. | |
# | |
def xx(n) ; 37 - n; end | |
puts xx -5 # output is 42 | |
yy = 37 | |
puts yy -5 # output is 32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment