Closed tra38 closed 7 years ago
Thanks. I’ll explore the problem now and look to fix this for version 0.15
—might require more detail in the docs to clarify anything that’s potentially confusing.
Looks like there’s a mistake in the docs. My apologies for the confusion this caused.
There’s already a test which defines the correct behaviour that demonstrates how it’s supposed to work, which is the same as your second example above.
In terms of the original API decision, there are several things I wanted to achieve here:
For some reason it didn’t get documented properly (possibly due to copy/pasting example code blocks). I’ll make sure this gets fixed.
To resolve this issue, I had to modify
#pluralize_cats
slightly...Oddly, when I copy and paste the example Modifier Mixer code in IRB (which states that I should use
self
), I also get theArgumentError: wrong number of arguments (given 1, expected 0)
.I originally wrote this code in Ruby 2.4.0, but I tested it as far back as 2.2.2, and still got that same error.