R.I. --

> > +      if Puppet.features.rubygems?
> > +        Thread.current[:gemsearch_directories] ||= []
> > +        Thread.current[:gemsearch_directories] = Gem.all_load_paths
> > if Thread.current[:gemsearch_directories].empty?
> > +        return Thread.current[:gemsearch_directories]
> > +      end
> 
> This should really just be:
> 
> if Puppet.features.rubygems?
>    return Thread.current[:gemsearch_directories] ||= Gem.all_load_paths
> end

:) You took the words right out of my mouth...er, email--I was about to
suggest just that.  Also, if you are going to follow the per-compile
pattern of module_dir (which seems reasonable) you should also clear the
thread var (see lib/puppet/configurer.rb around line 160) so that it
doesn't get stale.

-- Markus




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to