diff --git a/lib/sprockets/utils.rb b/lib/sprockets/utils.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/utils.rb
+++ b/lib/sprockets/utils.rb
@@ -8,15 +8,15 @@ module Sprockets
     # encoding and we want to avoid syntax errors in other interpreters.
     UTF8_BOM_PATTERN = Regexp.new("\\A\uFEFF".encode('utf-8'))
 
-    def self.read_unicode(pathname, external_encoding = Encoding.default_external)
-      Pathname.new(pathname).open("r:#{external_encoding}") do |f|
+    def self.read_unicode(filename, external_encoding = Encoding.default_external)
+      Pathname.new(filename).open("r:#{external_encoding}") do |f|
         f.read.tap do |data|
           # Eager validate the file's encoding. In most cases we
           # expect it to be UTF-8 unless `default_external` is set to
           # something else. An error is usually raised if the file is
           # saved as UTF-16 when we expected UTF-8.
           if !data.valid_encoding?
-            raise EncodingError, "#{pathname} has a invalid " +
+            raise EncodingError, "#{filename} has a invalid " +
               "#{data.encoding} byte sequence"
 
             # If the file is UTF-8 and theres a BOM, strip it for safe concatenation.
Allow non-pathnames into read_unicode