Skip to content
Browse files

Cache relative_pathname

  • Loading branch information...
1 parent 67df578 commit 1eac3303d2321e0101bd2e1c3bcea24f573d0be5 @josh josh committed Oct 10, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sprockets/asset.rb
View
2 lib/sprockets/asset.rb
@@ -198,7 +198,7 @@ def eql?(other)
# Get pathname with its root stripped.
def relative_pathname
- Pathname.new(relativize_root_path(pathname))
+ @relative_pathname ||= Pathname.new(relativize_root_path(pathname))
end
# Replace `$root` placeholder with actual environment root.

0 comments on commit 1eac330

Please sign in to comment.
Something went wrong with that request. Please try again.