colinta/motion-wiretap — pull request #10 by nathankot (2014-07-09 10:38:25+00:00)
Title: [WIP] Fix for weird wrong number of arguments bug

This is my humble attempt at #9 - it's far from finished but makes it work for
my current use case. Anyways, I started with a spec that includes my code that
caused the bug, and went from there... The problem area in this case is in this
block of code:

```ruby
class WiretapFilter < WiretapChild

# ...

def trigger_changed(*values)
if @filter.call(*values)
super(*values)
end
end

end
```

Where `super(*values)` seems to have forgotten the arity of
`Wiretap::trigger_changed`. After many iterations, the only thing that seems to
work is:

```ruby
Wiretap.instance_method(:trigger_changed).bind(self).call(*values)
```

It's super ugly but works for me... Definitely a RM bug, might be related to
this?: http://hipbyte.myjetbrains.com/youtrack/issue/RM-486

Also I find it weird that this isn't happening on the other `WiretapChild`'s
(combiner, reducer) etc.. maybe its just chance that it hasn't occured with them
yet.

Any opinions?