Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def my_method
  2. 'I have run correctly'
  3. end
  4.  
  5. args = []
  6. kwargs = {}
  7.  
  8. my_method *args, **kwargs
  9. => ArgumentError: wrong number of arguments (given 1, expected 0)
  10.  
  11. my_method *args, **{}
  12. => 'I have run correctly'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement