Created
October 28, 2012 16:56
-
-
Save danbeaulieu/3969139 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
class TwoListener | |
def success(one, two) | |
puts "#{one}, #{two}" | |
end | |
end | |
def sender(listener, *args) | |
listener.send(:success, *args) | |
end | |
def two_params | |
return "x", "y" | |
end | |
tl = TwoListener.new | |
sender(tl, two_params) | |
ArgumentError: wrong number of arguments (1 for 2) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment