Skip to content

Instantly share code, notes, and snippets.

@danbeaulieu
Created October 28, 2012 16:56
Show Gist options
  • Save danbeaulieu/3969139 to your computer and use it in GitHub Desktop.
Save danbeaulieu/3969139 to your computer and use it in GitHub Desktop.
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