Because // is an empty regular expression.
Not only that, but also a division by a regular expression.
That might sound silly, but in the pike programming language, you can split
strings with the / operator. Thus, someone might want to do this in ruby:
class String; alias_method :/, :split; end;
w1, w2 = "foo:bar"//:/; puts w2;
And to carry it even further, one can consider these examples too:
A division of a character constant:
puts ?//5;
Or a division of a symbol:
class Symbol; def /(x); x.send(self, 2); end; end;
puts ://5;
But of course these last two cases could still be exceptions from the
comment syntax, just like # now is not a comment in single quotes either.
(But note that the // comment could be normal syntax in C too before it was
accepted by C99, for example this expression
9//*foo*/2
has different meaning in traditional C and C99.)
ambrus