Skip to content

Commit 81a055c

Browse files
authored
URI.unescape is obsolete
It's throwing warnings on Ruby 2.7.2 per rails/rails#39733 this change should be fine
1 parent 8fcee36 commit 81a055c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi/request_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def parse_sort_criteria(sort_criteria)
314314

315315
sorts = []
316316
begin
317-
raw = URI.unescape(sort_criteria)
317+
raw = URI::DEFAULT_PARSER.unescape(sort_criteria)
318318
sorts += CSV.parse_line(raw)
319319
rescue CSV::MalformedCSVError
320320
fail JSONAPI::Exceptions::InvalidSortCriteria.new(format_key(@resource_klass._type), raw)

0 commit comments

Comments
 (0)