Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Commit

Permalink
Cache relative_pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Oct 11, 2011
1 parent 67df578 commit 1eac330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sprockets/asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1eac330

Please sign in to comment.