[#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:107142] [Ruby master Feature#15559] Logical XOR (^^) operator
From:
indirect <noreply@...>
Date:
2022-01-16 02:20:10 UTC
List:
ruby-core #107142
Issue #15559 has been updated by indirect (Andr辿 Arko).
mrkn (Kenta Murata) wrote in #note-1:
> I think `^^` can be useful for the case that both `expr1` and `expr2` are not boolean.
> Have you ever write such conditional expressions?
Yes. Here is an example I encountered today. I have a class initializer that takes one argument: `Foo.new(bar)`. Perhaps it looks like this:
``` ruby
class Foo
def initialize(bar)
@bar = bar
end
end
```
I want to add another kind of initialization, with a keyword: `Foo.new(baz: baz)`. That means I must allow `bar` to be nil. But I want to have only one of `bar` or `baz`. It is an error to provide both. Neither argument can be a boolean.
```ruby
class Foo
def initialize(bar = nil, baz: nil)
raise ArgumentError unless bar ^^ baz
@bar = bar || process_baz(baz)
end
end
```
----------------------------------------
Feature #15559: Logical XOR (^^) operator
https://bugs.ruby-lang.org/issues/15559#change-95990
* Author: baweaver (Brandon Weaver)
* Status: Open
* Priority: Normal
----------------------------------------
Currently we have bitwise `&` and logical `&&`, and bitwise `|` and logical `||`. Would it be possible to have logical `^^` in addition to the bitwise `^` for XOR?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>