[#68137] improve semantics of manpages — "Anthony J. Bentley" <anthony@...>
Hi,
1 message
2015/02/17
[#68144] Re: Future of test suites for Ruby — Anthony Crumley <anthony.crumley@...>
FYI...
4 messages
2015/02/17
[#68343] [Ruby trunk - Bug #10916] [Open] What the Ruby? SegFault? — ruby@...
Issue #10916 has been reported by why do i need this acct just to create a bug report.
5 messages
2015/02/27
[#68373] Re: [Ruby trunk - Bug #10916] [Open] What the Ruby? SegFault?
— "Martin J. Dürst" <duerst@...>
2015/03/02
> * Author: why do i need this acct just to create a bug report
[#68358] [Ruby trunk - Bug #10902] require("enumerator") scans LOAD_PATH 2x on every invocation — ruby@...1.net
Issue #10902 has been updated by Aman Gupta.
3 messages
2015/02/28
[ruby-core:68062] [Ruby trunk - Bug #10837] spatting a single element array produces an array instead of a single value for return and next
From:
alxtskrnk@...
Date:
2015-02-08 02:02:20 UTC
List:
ruby-core #68062
Issue #10837 has been updated by bug hit.
Nobuyoshi Nakada wrote:
> It's similar to `return *[1, 2]`.
No it's not similar,
`return *[1, 2]` means `return 1, 2`
similar would be:
`return *[1]` means `return 1`
in general, splatting in a context that takes a coma separated list of items (method args, rescue, return, next, multiple assignment) is supposed to destructure the array. The array should be gone, only the elemnts remain, so returning the `[1]` is wrong.
----------------------------------------
Bug #10837: spatting a single element array produces an array instead of a single value for return and next
https://bugs.ruby-lang.org/issues/10837#change-51448
* Author: bug hit
* Status: Rejected
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
irb(main):013:0> ->{return *[1]}.()
=> [1]
irb(main):014:0> ->{next *[1]}.()
=> [1]
______________
*[x] should mean x as it already does for arguments
--
https://bugs.ruby-lang.org/