[#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:107148] [Ruby master Feature#18408] Allow pattern match to set instance variables
From:
"palkan (Vladimir Dementyev)" <noreply@...>
Date:
2022-01-16 10:52:52 UTC
List:
ruby-core #107148
Issue #18408 has been updated by palkan (Vladimir Dementyev). ktsj (Kazuki Tsujimoto) wrote in #note-8: > If assignment to instance variables (or variables other than local variables) is allowed in pattern matching, there are problems such as: > > 1. The value during pattern matching can be observed by other threads > 2. The value of the instance variable will be undefined when pattern matching fails (ref: https://github.com/ruby/ruby/blob/v3_1_0/doc/syntax/pattern_matching.rdoc#label-Appendix+B.+Some+undefined+behavior+examples) In this context, what is the difference between the current approach and the new syntax: ```ruby case 1 in a if false in Integer => b end # User can do this and result in UB @a = a @b = b # vs. case 1 in @a if false in Integer => @b end ``` ? I understand, that these are too synthetic examples, and new syntax could make it a bit more likely to hit UB; however, we already have such edge cases, even documented, and I think the advantages of adding such syntax overcome the shortcomings. > However, in this case, the patterns available for normal pattern matching and right assignment will be different so I am negative about this change. Totally agree. ---------------------------------------- Feature #18408: Allow pattern match to set instance variables https://bugs.ruby-lang.org/issues/18408#change-95998 * 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>