Skip to content

Instantly share code, notes, and snippets.

@mmachenry
Created October 27, 2016 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmachenry/13a1da2aed03a32de34a354c0a203bf0 to your computer and use it in GitHub Desktop.
Save mmachenry/13a1da2aed03a32de34a354c0a203bf0 to your computer and use it in GitHub Desktop.
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>'
@ciaran
Copy link

ciaran commented Oct 27, 2016

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 >

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment