[#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:107034] [Ruby master Bug#18470] Union of two identical sets produces a set with duplicate members
From:
"ufuk (Ufuk Kayserilioglu)" <noreply@...>
Date:
2022-01-11 01:18:41 UTC
List:
ruby-core #107034
Issue #18470 has been updated by ufuk (Ufuk Kayserilioglu).
Doesn't the following from https://bugs.ruby-lang.org/issues/16996 address this issue?
> ...
> Today, it is official that sets with elements that are later mutated must be `Set#reset`, so it is official that this should not be relied upon.
> ...
It seems like this is not a bug and the outcome is expected without a call to `Set#reset`:
```ruby
C = Struct.new :id
a = Set.new
b = Set.new
f = C.new
a << f
f.id = 1
b << f
a.reset
# => #<Set: {#<struct C id=1>}>
a + b
# => #<Set: {#<struct C id=1>}>
b + a
# => #<Set: {#<struct C id=1>}>
```
----------------------------------------
Bug #18470: Union of two identical sets produces a set with duplicate members
https://bugs.ruby-lang.org/issues/18470#change-95865
* Author: smokinggun (John Weir)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-linux]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
We came across an issue where the union of two identical sets produced a non uniq Set.
We noticed this when upgrading from 2.7.1 to 3.1
See the attached test, the last assertion fails
``` ruby
C = Struct.new :id
a = Set.new
b = Set.new
f = C.new
a << f
f.id = 1
b << f
a + b
# => #<Set: {#<struct C id=1>, #<struct C id=1>}>
b + a
# => #<Set: {#<struct C id=1>}>
(a + b).uniq
=> [#<struct C id=1>]
```
---Files--------------------------------
set_test.rb (348 Bytes)
--
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>