That constant should definitely be namespaced, I'll get a new version out
today that doesn't do that. I have seen this behavior and it's made testing
the gemcutter gem hard, since I have to uninstall all local versions in
order to get my working copy loaded.

-Nick

On Fri, Aug 21, 2009 at 9:34 AM, Jim Weirich <jim.weir...@gmail.com> wrote:

> I know some work was put into making require 'rubygems' as lightweight as
> possible, so I was a little surprised to find that requiring rubygems into
> my program will also load any gem plugins that might be defined.  I thought
> the plugins were for the gem command, not for general rubygems usage.
>
> Demonstration:
>
> $ irb
> irb(main):001:0> URL
> NameError: uninitialized constant URL
>        from (irb):1
> irb(main):002:0> require 'rubygems'
> => true
> irb(main):003:0> URL
> => "http://gemcutter.org";
>
> URL is defined in the gemcutter gem's gem plugin so that's a good
> indication that gems plugins are loaded with require rubygems.
>
> (And yes, I consider a top level, non-namespaced constant to be a bug and
> have submitted a patch to gemcutter to fix that).
>
> Comments.  Is this intended, or something that slipped through the cracks.
>
> --
> -- Jim Weirich
> -- jim.weir...@gmail.com
>
> _______________________________________________
> Rubygems-developers mailing list
> http://rubyforge.org/projects/rubygems
> Rubygems-developers@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubygems-developers
>
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to