diff --git a/bundler/lib/bundler/lazy_specification.rb b/bundler/lib/bundler/lazy_specification.rb index 198906b987ae..5d92290d9725 100644 --- a/bundler/lib/bundler/lazy_specification.rb +++ b/bundler/lib/bundler/lazy_specification.rb @@ -35,7 +35,8 @@ def eql?(other) end def hash - identifier.hash + # memoize this to help performance when called repeatedly for hash operations + @hash ||= identifier.hash end ##