[Rubygems-developers] possible bug in doc_manager.rb

Chad Woolley thewoolleyman at gmail.com
Tue Dec 18 06:51:45 EST 2007


NOTE: this may be Ruby 1.8.5 specific.  In my tests which exercise gem
installation, I'm getting errors like this:

uninitialized constant RubyToken::AlreadyDefinedToken

This is occurring from Gem::DocManager#load_rdoc, where it does:

 require 'rdoc/rdoc'

I get this same error when I try this require in IRB, on multiple
platforms using ruby 1.8.5:

irb(main):001:0> require 'rdoc/rdoc'
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:31: warning: already
initialized constant EXPR_BEG
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:32: warning: already
initialized constant EXPR_MID
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:33: warning: already
initialized constant EXPR_END
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:34: warning: already
initialized constant EXPR_ARG
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:35: warning: already
initialized constant EXPR_FNAME
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:36: warning: already
initialized constant EXPR_DOT
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:37: warning: already
initialized constant EXPR_CLASS
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:262: warning: already
initialized constant TokenDefinitions
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:267: warning: already
initialized constant TkReading2Token
/usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:268: warning: already
initialized constant TkSymbol2Token
NameError: uninitialized constant RubyToken::AlreadyDefinedToken
        from /usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:273:in `def_token'
        from /usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:300
        from /usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:299:in `each'
        from /usr/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:299
        from /usr/local/lib/ruby/1.8/rdoc/rdoc.rb:8:in `require'
        from /usr/local/lib/ruby/1.8/rdoc/rdoc.rb:8
        from (irb):1:in `require'
        from (irb):1


I'm not sure if this is a bug in rubygems, or if I am missing a
prerequisite require since I'm invoking gem installation
programatically.  This require has been around forever, but there have
been some recent refactorings to doc_manager...

Thanks,
-- Chad


More information about the Rubygems-developers mailing list