-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
The stdlib URI can serialize itself back to a string:
irb(main):002:0> URI.parse('http://foo.bar') => #<URI::HTTP http://foo.bar> irb(main):003:0> URI.parse('http://foo.bar').to_s => "http://foo.bar"
MongoDB URIs do not support this functionality:
irb(main):001:0> Mongo::URI.new('mongodb://foo.bar') => #<Mongo::URI:0x00005612fe09f620 @string="mongodb://foo.bar", @options={}, @servers=["foo.bar"], @user=nil, @password=nil, @uri_options={}> irb(main):002:0> Mongo::URI.new('mongodb://foo.bar').to_s => "#<Mongo::URI:0x00005612fe0a1ec0>"
This makes it impossible to take a URI string, parse it into a URI, modify the URI and serialize the result out to a string to be used as a URI later.
- depends on
-
RUBY-3095 SMC options are not correctly converted to Ruby options
- Closed