I\'m trying to find a robust method of joining partial url path segments together. Is there a quick way to do this?
I tried the following:
puts URI::
Have uri as URI::Generic or subclass of thereof
URI::Generic
uri.path += '/123'
Enjoy!
06/25/2016 UPDATE for skeptical folk
require 'uri' uri = URI('http://ioffe.net/boris') uri.path += '/123' p uri
Outputs
Run me