Parser bug?

So I was playing around, and decided that I wanted to define a method
that ended in ?, but also happened to not have anything but an ending,
<g>.

So I did this:

def ?()
end

I got a syntax error, not very surprising. The interesting bit was
_what_ syntax error I got:

% ruby <<HERE
> def ?()
> end
> HERE
-:1: parse error, unexpected tINTEGER
def ?()
       ^

Obviously a ')' is not an integer token. Thoughts? Comments? Insults? Is
this really a bug?

the ? operator takes an ascii symbol and returns numerical value for it
(namely integer)

lopex

Marcin Mielżyński wrote:

the ? operator takes an ascii symbol and returns numerical value for it
(namely integer)

at parse time of course...

lopex