[#73707] [Ruby trunk Misc#12004] Code of Conduct — hanmac@...
Issue #12004 has been updated by Hans Mackowiak.
3 messages
2016/02/05
[#73730] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/07
[#73746] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/09
[#73919] [Ruby trunk Feature#11262] Make more objects behave like "Functions" — Ruby-Lang@...
Issue #11262 has been updated by J旦rg W Mittag.
3 messages
2016/02/22
[#74019] [Ruby trunk Bug#12103][Rejected] ruby process hangs while executing regular expression. — duerst@...
Issue #12103 has been updated by Martin D端rst.
3 messages
2016/02/27
[ruby-core:73811] [Ruby trunk Bug#11860] Double splat does not work on empty hash assigned via variable
From:
justcolin@...
Date:
2016-02-14 16:48:16 UTC
List:
ruby-core #73811
Issue #11860 has been updated by Colin Fulton.
A similar bug happens when using the double splat operator in the parameter list of a method definition. See #12022.
----------------------------------------
Bug #11860: Double splat does not work on empty hash assigned via variable
https://bugs.ruby-lang.org/issues/11860#change-56989
* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: 2.3.0preview2 (2015-12-11 trunk 53028) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
When an empty hash is given as a literal, the double splat operates on it, and leaves nothing, which is expected.
class String
def foo; end
end
[**{}] # => []
"foo".foo(**{}) # => nil
"foo".send(**{}) # => nil
However, when an empty hash is given via variable, the double splat retains an empty hash in place.
h = {}
[**h] # => [{}]
"foo".foo(**h) # => wrong number of arguments (given 1, expected 0)
"foo".send(**h) # => wrong number of arguments (given 1, expected 0)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>