From: hsbt@... Date: 2016-10-20T08:03:32+00:00 Subject: [ruby-core:77681] [Ruby trunk Misc#11960][Closed] Tiny documentation improvement for URI.escape Issue #11960 has been updated by Hiroshi SHIBATA. Status changed from Open to Closed Assignee set to Hiroshi SHIBATA ---------------------------------------- Misc #11960: Tiny documentation improvement for URI.escape https://bugs.ruby-lang.org/issues/11960#change-60965 * Author: mathew murphy * Status: Closed * Priority: Normal * Assignee: Hiroshi SHIBATA ---------------------------------------- This just cropped up on Reddit. A user was confused by URI.escape's behavior, why it was obsolete, and what should be used instead. So, here's a trivial doc patch: ``` diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 4c7d112..e139499 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -81,6 +81,10 @@ module Escape # # Escapes the string, replacing all unsafe characters with codes. # + # This method is obsolete and should not be used. Instead, use + # CGI.escape, URI.www_form_encode or URI.www_form_encode_component + # depending on your specific use case. + # # == Usage # # require 'uri' ``` -- https://bugs.ruby-lang.org/ Unsubscribe: