On May 22, 2007, at 02:21 , Ryan Davis wrote:

> What is the current equivalent of:
>
>      begin
>        require 'rubygems'
>        require 'rubygems/loadpath_manager'
>        Gem::LoadPathManager.build_paths
>        paths.push(*Gem::LoadPathManager.paths)
>      rescue LoadError
>        # do nothing
>      end

This seems to be the correct way to go:

     begin
       require 'rubygems'
       paths.push(*Gem.latest_load_paths)
     rescue LoadError => e
       # do nothing
     end

Maybe I was playing too deep?

_______________________________________________
Rubygems-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to