Skip to content

Commit 86ea3e2

Browse files
committed
Fix Sprockets::Base#unescape to avoid unexpected change landed in 3.7.4.
384bf45 breaks `Sprockets::Base#unescape`. The following code has been changed between 3.7.3 and 3.7.4. ``` console $ ruby -I ./lib -r sprockets -e 'p [Sprockets::VERSION, Sprockets::Environment.new.send(:unescape, "%")]' ``` ``` ["3.7.3", "%"] ["3.7.4", "%25"] ``` This commit changes back to the behavior of 3.7.3.
1 parent fb92f7b commit 86ea3e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/sprockets/legacy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def matches_filter(filters, logical_path, filename)
155155
end
156156

157157
def unescape(str)
158-
URIUtils::URI_PARSER.unescape(str)
158+
str = URIUtils::URI_PARSER.unescape(str)
159159
str.force_encoding(Encoding.default_internal) if Encoding.default_internal
160160
str
161161
end

0 commit comments

Comments
 (0)