[#98621] Re: Function getlogin_r()'s protoype] — Bertram Scharpf <lists@...>
FYI,
3 messages
2020/06/02
[#98947] [Ruby master Feature#16986] Anonymous Struct literal — ko1@...
Issue #16986 has been reported by ko1 (Koichi Sasada).
66 messages
2020/06/26
[#98962] [Ruby master Bug#16988] Kernel.load loads file from current directory without '.' in path — misharinn@...
Issue #16988 has been reported by TheSmartnik (Nikita Misharin).
5 messages
2020/06/26
[#98969] [Ruby master Feature#16994] Sets: shorthand for frozen sets of symbols / strings — marcandre-ruby-core@...
Issue #16994 has been reported by marcandre (Marc-Andre Lafortune).
7 messages
2020/06/26
[#100117] [Ruby master Feature#16994] Sets: shorthand for frozen sets of symbols / strings
— matz@...
2020/09/25
Issue #16994 has been updated by matz (Yukihiro Matsumoto).
[ruby-core:98802] [Ruby master Bug#16504] `foo(*args, &args.pop)` should pass all elements of args
From:
eregontp@...
Date:
2020-06-14 11:57:42 UTC
List:
ruby-core #98802
Issue #16504 has been updated by Eregon (Benoit Daloze).
Do we have an idea of how much overhead would it be to disable this not-correct optimization?
Arrays are copy-on-write so it seems not so expensive to have an extra array, and also guarantees the callee cannot mutate the original array.
I'd rather we don't compromise semantics because optimizations are too limited.
For the `&:symbol` case, we could check if Symbol#to_proc is redefined.
For the `&local_var` case, we could check if it's already a Proc.
----------------------------------------
Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
https://bugs.ruby-lang.org/issues/16504#change-86164
* Author: mame (Yusuke Endoh)
* Status: Open
* Priority: Normal
* ruby -v: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
https://bugs.ruby-lang.org/issues/16500?next_issue_id=16499&prev_issue_id=16501#note-7
```
# in 2.7
args = [1, 2, -> {}]; foo( *args, &args.pop) #=> passes [1, 2] (bug; [1, 2, ->{}] is expected)
args = [1, 2, -> {}]; foo(0, *args, &args.pop) #=> passes [0, 1, 2, ->{}] (good)
```
--
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>