Skip to content

Commit

Permalink
memoize
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewland committed Feb 21, 2009
1 parent 9724907 commit 304927e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rack_rubygems.rb
Expand Up @@ -82,6 +82,7 @@ class RackRubygems < Sinatra::Base
end end


def source_index def source_index
return @source_index if @source_index
@gem_dir = Gem.dir @gem_dir = Gem.dir
@spec_dir = File.join @gem_dir, 'specifications' @spec_dir = File.join @gem_dir, 'specifications'
@source_index = Gem::SourceIndex.from_gems_in @spec_dir @source_index = Gem::SourceIndex.from_gems_in @spec_dir
Expand Down

0 comments on commit 304927e

Please sign in to comment.