[#63592] [ruby-trunk - Bug #10009] IO operation is 10x slower in multi-thread environment — normalperson@...
Issue #10009 has been updated by Eric Wong.
3 messages
2014/07/08
[#63682] [ruby-trunk - Feature #10030] [PATCH] reduce rb_iseq_struct to 296 bytes — ko1@...
Issue #10030 has been updated by Koichi Sasada.
3 messages
2014/07/13
[#63703] [ruby-trunk - Feature #10030] [PATCH] reduce rb_iseq_struct to 296 bytes — ko1@...
Issue #10030 has been updated by Koichi Sasada.
3 messages
2014/07/14
[#63743] [ruby-trunk - Bug #10037] Since r46798 on Solaris, "[BUG] rb_vm_get_cref: unreachable" during make — ngotogenome@...
Issue #10037 has been updated by Naohisa Goto.
3 messages
2014/07/15
[#64136] Ruby 2.1.2 (and 2.1.1 and probably others) assumes a libffi with 3 version numbers in extconf.rb — "Jeffrey 'jf' Lim" <jfs.world@...>
As per subject.
4 messages
2014/07/31
[#64138] Re: Ruby 2.1.2 (and 2.1.1 and probably others) assumes a libffi with 3 version numbers in extconf.rb
— "Jeffrey 'jf' Lim" <jfs.world@...>
2014/07/31
On Thu, Jul 31, 2014 at 6:03 PM, Jeffrey 'jf' Lim <[email protected]>
[ruby-core:63909] [ruby-trunk - Bug #10075] URI#join needs documentation of its behavior
From:
matthew@...
Date:
2014-07-20 23:36:29 UTC
List:
ruby-core #63909
Issue #10075 has been updated by Matthew Kerwin.
Eric Hodel wrote:
> I have changed this to a doc bug, the behavior does not surprise me, I expect it to behave as it does.
It surprised me. The operation it performs appears to be "resolve relative" [1], but, like OP, from the name alone I'd have expected "concatenate with separators".
I think the case could be made that either/both operation could be called "join", but I think there's a better name for both. Anyway, better documentation would resolve the issue.
[1] http://tools.ietf.org/html/rfc3986#section-5.2
----------------------------------------
Bug #10075: URI#join needs documentation of its behavior
https://bugs.ruby-lang.org/issues/10075#change-47943
* Author: John Feminella
* Status: Open
* Priority: Normal
* Assignee:
* Category: doc
* Target version:
* ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
The [documentation](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/uri/rdoc/URI.html#method-c-join) for `URI.join` says:
> "Joins URIs."
Let's look at what a similar `join` method [documentation](http://www.ruby-doc.org/core-2.1.2/File.html#method-c-join) says, on `File`:
> Returns a new string formed by joining the strings using File::SEPARATOR.
That seems pretty clear. Indeed, we get:
~~~
File.join 'path', 'to', 'join'
# => "path/to/join"
~~~
which is what we expected. What do we get if we try the natural `URI` equivalent?
~~~
> URI.join('http://example.com', 'foo', 'bar')
~~~
We probably expect something like:
~~~
# => "http://example.com/foo/bar"
~~~
but we'll actually get
~~~
# => "http://example.com/bar"
~~~
This seems surprising and counterintuitive, even if it matches the documentation behavior, because the documentation doesn't explain why that's the case. I think if Ruby is going to be surprising in that way, it needs to explain that to users in the documentation.
--
https://bugs.ruby-lang.org/