Isn't this the point where you congratulate the interviewee on the breadth of their off the top of their head Ruby knowledge ... and then ask them to do it by hand?
Surely the latter won't be a surprise; if I answered like that I'd do it with a grin and a "Well, I could do it like this [write out the above], but I suspect you want something more like this [then write an implementation of the method]."
I suspect that's why more artificial tasks like FizzBuzz are still popular.
So you might inadvertently end up testing a candidate's knowledge of their language's standard libraries, unless you forbid them from using these.