Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #47 from jdrago999/patch-1

Remove warnings about URI.unescape being deprecated
  • Loading branch information...
commit 7f68295e57f9bcbabb5ec3b07d0109d26153b7f0 2 parents a4fc4e8 + 0264b9e
Michael Klishin michaelklishin authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/amq/uri.rb
6 lib/amq/uri.rb
View
@@ -18,14 +18,14 @@ def self.parse(connection_string)
opts = {}
opts[:scheme] = uri.scheme
- opts[:user] = ::URI.unescape(uri.user) if uri.user
- opts[:pass] = ::URI.unescape(uri.password) if uri.password
+ opts[:user] = ::CGI::unescape(uri.user) if uri.user
+ opts[:pass] = ::CGI::unescape(uri.password) if uri.password
opts[:host] = uri.host if uri.host
opts[:port] = uri.port || AMQP_PORTS[uri.scheme]
opts[:ssl] = uri.scheme.to_s.downcase =~ /amqps/i
if uri.path =~ %r{^/(.*)}
raise ArgumentError.new("#{uri} has multiple-segment path; please percent-encode any slashes in the vhost name (e.g. /production => %2Fproduction). Learn more at http://bit.ly/amqp-gem-and-connection-uris") if $1.index('/')
- opts[:vhost] = ::URI.unescape($1)
+ opts[:vhost] = ::CGI::unescape($1)
end
opts
Please sign in to comment.
Something went wrong with that request. Please try again.