[#119132] Segfault using ruby C on MacOS (Intel Catalina and M2 Sonoma) — "martin.kufner--- via ruby-core" <ruby-core@...>
Hey guys,
4 messages
2024/09/12
[#119133] Re: Segfault using ruby C on MacOS (Intel Catalina and M2 Sonoma)
— "martin.kufner--- via ruby-core" <ruby-core@...>
2024/09/12
I just saw, that the #includes dont show up in the c file ...
[#119145] [Ruby master Misc#20728] Propose Eileen Uchitelle as a core committer — "kddnewton (Kevin Newton) via ruby-core" <ruby-core@...>
Issue #20728 has been reported by kddnewton (Kevin Newton).
14 messages
2024/09/12
[#119312] [Ruby master Bug#20762] `make test-basic` with -DRGENGC_FORCE_MAJOR_GC is always failure — "hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@...>
Issue #20762 has been reported by hsbt (Hiroshi SHIBATA).
6 messages
2024/09/27
[ruby-core:119262] [Ruby master Feature#20756] Introduce Boolean class
From:
"kbrock (Keenan Brock) via ruby-core" <ruby-core@...>
Date:
2024-09-19 21:50:55 UTC
List:
ruby-core #119262
Issue #20756 has been reported by kbrock (Keenan Brock).
----------------------------------------
Feature #20756: Introduce Boolean class
https://bugs.ruby-lang.org/issues/20756
* Author: kbrock (Keenan Brock)
* Status: Open
----------------------------------------
Hello All,
Is is possible to add a parent class for `TrueClass` and `FalseClass`?
I always found it strange that there was not a concept to group `true` and `false` together.
e.g.:
```ruby
class TrueClass < Boolean ; end
class FalseClass < Boolean ; end
# replaces the hack:
module Boolean ; end
TrueClass.include(Boolean);
FalseClass.include(Boolean);
```
In our code, we often want to validate that a value is of a certain type.
```ruby
case(value)
when String ...
when Integer ...
when true, false ... # Boolean
# alt: when TrueClass, FalseClass
end
# or
def valid_args?
value.kind_of?(String)
end
def valid_args?
value.kind_of?(Integer)
end
def valid_args?
[true, false].include?(value)
[TrueClass, FalseClass].detect { |klass| value.kind_of?(klass) }
end
```
Does it make sense to others to have a way to group `true` and `false` together?
Thank you for your thoughts,
Keenan
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/