diff --git a/lib/sprockets/utils.rb b/lib/sprockets/utils.rb index 1233b78f7..bb0c68d71 100644 --- a/lib/sprockets/utils.rb +++ b/lib/sprockets/utils.rb @@ -106,7 +106,7 @@ def concat_javascript_sources(buf, source) source = source.encode(Encoding::UTF_32LE) unless source.ascii_only? return buf if string_end_with_semicolon?(source) - if whitespace = WHITESPACE_ORDINALS[buf[-1].ord] + if whitespace = WHITESPACE_ORDINALS[source[-1].ord] buf[-1] = ";#{whitespace}" else buf << ";"