[#107008] [Ruby master Bug#18465] Make `IO#write` atomic. — "ioquatix (Samuel Williams)" <noreply@...>
Issue #18465 has been reported by ioquatix (Samuel Williams).
16 messages
2022/01/09
[#107150] [Ruby master Feature#18494] [RFC] ENV["RUBY_GC_..."]= changes GC parameters dynamically — "ko1 (Koichi Sasada)" <noreply@...>
Issue #18494 has been updated by ko1 (Koichi Sasada).
4 messages
2022/01/17
[#107170] Re: [Ruby master Feature#18494] [RFC] ENV["RUBY_GC_..."]= changes GC parameters dynamically
— Eric Wong <normalperson@...>
2022/01/17
> https://bugs.ruby-lang.org/issues/18494
[#107302] [Ruby master Bug#18553] Memory leak on compiling method call with kwargs — "ibylich (Ilya Bylich)" <noreply@...>
Issue #18553 has been reported by ibylich (Ilya Bylich).
4 messages
2022/01/27
[#107346] [Ruby master Misc#18557] DevMeeting-2022-02-17 — "mame (Yusuke Endoh)" <noreply@...>
Issue #18557 has been reported by mame (Yusuke Endoh).
18 messages
2022/01/29
[ruby-core:107198] [Ruby master Feature#18408] Allow pattern match to set instance variables
From:
"Eregon (Benoit Daloze)" <noreply@...>
Date:
2022-01-19 18:02:35 UTC
List:
ruby-core #107198
Issue #18408 has been updated by Eregon (Benoit Daloze).
Dan0042 (Daniel DeLorme) wrote in #note-16:
> I don't think an additional assignment and a few bytes on the stack can be considered a performance concern.
It can, that cost would be for every variable in the pattern, not just `@ivar` because if we do such a change it should be consistent for all variables in pattern matching.
Variables in different clauses but with the same name might not even be able to reuse the same temporary variable (e.g., if they assign/read conditionally).
```ruby
case 1
in a if a.even?
in Integer => b
end
# is like
a = nil
case 1
when -> v { a = v; a.even? }; expr1
when -> v { Integer === v and b = v }; expr2
end
# or
if a = 1 and a.even?
expr1
elsif Integer === v and b = v
expr2
end
```
In practice it should rarely matter because if a clause isn't matched the code should obviously not look at variables not set by that clause.
----------------------------------------
Feature #18408: Allow pattern match to set instance variables
https://bugs.ruby-lang.org/issues/18408#change-96061
* Author: Dan0042 (Daniel DeLorme)
* Status: Assigned
* Priority: Normal
* Assignee: ktsj (Kazuki Tsujimoto)
----------------------------------------
I expected this to work:
```ruby
42 => @v
```
But instead it raises "syntax error, unexpected instance variable"
Is this intentional?
--
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>