Created
October 27, 2016 11:23
-
-
Save mmachenry/13a1da2aed03a32de34a354c0a203bf0 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 a(x); p x; end | |
#a = 1 | |
b = 2 | |
c = a + b | |
d = a +b | |
puts c | |
puts d | |
#test.rb:5: warning: ambiguous first argument; put parentheses or even spaces | |
#test.rb:1:in `a': wrong number of arguments (0 for 1) (ArgumentError) | |
# from test.rb:4:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2.2.2 :001 > def a(x); x * 2; end
=> :a
2.2.2 :002 > a +5
(irb):2: warning: ambiguous first argument; put parentheses or a space even after `+' operator
=> 10
2.2.2 :003 >