[#83773] [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769 — usa@...
Issue #14108 has been updated by usa (Usaku NAKAMURA).
9 messages
2017/11/15
[#83774] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
usa@garbagecollect.jp wrote:
[#83775] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric
[#83779] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#83781] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric,
[#83782] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[ruby-core:83638] [Ruby trunk Bug#10856][Open] Splat with empty keyword args gives unexpected results
From:
ruby-core@...
Date:
2017-11-01 17:02:34 UTC
List:
ruby-core #83638
Issue #10856 has been updated by marcandre (Marc-Andre Lafortune).
Status changed from Closed to Open
Assignee set to nobu (Nobuyoshi Nakada)
Target version set to 2.5
This is not actually fixed.
```
def foo
puts "OK"
end
options = {}
foo(**options) # => OK (In 2.5.0preview1)
args = []
foo(*args, **options) # => ArgumentError: wrong number of arguments (given 1, expected 0)
```
The second call should also output "Ok".
Hopefully Nobu can crack this before 2.5.0
----------------------------------------
Bug #10856: Splat with empty keyword args gives unexpected results
https://bugs.ruby-lang.org/issues/10856#change-67666
* Author: seantheprogrammer (Sean Griffin)
* Status: Open
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 2.5
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
When keyword args are passed to a method with splat, and there are no keyword args, an empty hash is sent. I would expect no argument to be given, same as splat with an empty array. For example:
```ruby
def foo
end
foo(**{})
```
This causes an argument error, as an empty hash is passed. I would expect the same behavior as
```ruby
def foo
end
foo(*[])
```
--
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>