On 10/7/05, Gavin Sinclair <gsinclair / gmail.com> wrote:
> Sorry about the big ASCII dump, but this is what I get when trying to
> require 'rdoc/rdoc'.  Any ideas?

This seems to be some strange interaction between IRB and RDoc: the
module RubyTokens for parsing Ruby are defined similarly in two
different files (in my case C:\ruby\lib\ruby\1.8\irb\ruby-token.rb and
C:\ruby\lib\ruby\1.8\rdoc\parsers\parse_rb.rb.) When defining the
tokens the module makes sure they aren't already defined (apparently a
good idea in this case), but unfortunately the exception that is
thrown on duplicate tokens (AlreadyDefinedToken) isn't defined until
line 434 of parse_rb.rb. There is something else going on, but I'm too
tired to try to dig into it now.

The question is, why is identical code defined in two places (with
only slight differences?)

Ryan