[ruby-core:68288] [Ruby trunk - Bug #10896] First example in the documentation for URI::join shows incorrect result

From: glenab@...
Date: 2015-02-24 18:05:07 UTC
List: ruby-core #68288
Issue #10896 has been updated by Glen Aultman-Bettridge.


I submitted a PR (https://github.com/ruby/ruby/pull/838) for this

----------------------------------------
Bug #10896: First example in the documentation for URI::join shows incorrect result
https://bugs.ruby-lang.org/issues/10896#change-51643

* Author: Glen Aultman-Bettridge
* Status: Open
* Priority: Low
* Assignee: 
* ruby -v: 2.2.0
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
The example is 

~~~
p URI.join("http://example.com/","main.rbx")
# => #<URI::HTTP:0x2022ac02 URL:http://localhost/main.rbx>
~~~

but should be

~~~
p URI.join("http://example.com/","main.rbx")
# => #<URI::HTTP:0x2022ac02 URL:http://example.com/main.rbx>
~~~

This seems to have been introduced in the documentation for 1.9.3 and occurs in 2.1.5 and 2.2.0 docs as well.



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next