diff --git a/lib/x/errors/http_error.rb b/lib/x/errors/http_error.rb index 2aceedc..9f54aeb 100644 --- a/lib/x/errors/http_error.rb +++ b/lib/x/errors/http_error.rb @@ -35,7 +35,7 @@ def message_from_json_response(response) end def json?(response) - JSON_CONTENT_TYPE_REGEXP.match?(response["content-type"]) + JSON_CONTENT_TYPE_REGEXP === response["content-type"] end end end diff --git a/lib/x/response_parser.rb b/lib/x/response_parser.rb index d24a4a1..0b4d6ec 100644 --- a/lib/x/response_parser.rb +++ b/lib/x/response_parser.rb @@ -55,7 +55,7 @@ def error_class(response) end def json?(response) - JSON_CONTENT_TYPE_REGEXP.match?(response["content-type"]) + JSON_CONTENT_TYPE_REGEXP === response["content-type"] end end end