Josh --
Perhaps I'm being dense, but it's not clear to me what you are trying to
accomplish. I'm not familiar with the linguistics gem, but (looking at
the tests
https://github.com/ged/linguistics/blob/master/spec/linguistics/en/pluralization_spec.rb
at least) it appears that plural should be called as:
"fish".en.plural
or
:box".en.plural(n)
And in any case appears to return a string. (One possible point of
confusion may be if I've found a different linguistics gem than you are
using).
You example looks like it should accept 'can', but only if the the
plural of 'can' is not nil or false, which is a complex way of saying it
looks like it only accepts "can".
If you are wanting to match a fixed set of words and accept their plural
or singular forms interchangeably, your best bet is to probably to just
include them as alternatives:
rule r1
"can" / "cans"
end
or for regular cases, form them with an optional "s" / "es":
rule r1
"can" "s"?
end
rule r2
"box" "es"?
end
I suspect, though, that this is not the sort of answer you're looking
for.
Really, it all depends on what you are trying to accomplish. If you
give us a bit more detail about that, we'll likely be able to help more
effectively.
-- MarkusQ