[#114774] [Ruby master Feature#19884] Make Safe Navigation Operator work on classes — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>
Issue #19884 has been reported by p8 (Petrik de Heus).
13 messages
2023/09/15
[ruby-core:114862] [Ruby master Feature#13933] Add Range#empty?
From:
"akr (Akira Tanaka) via ruby-core" <ruby-core@...>
Date:
2023-09-21 11:47:51 UTC
List:
ruby-core #114862
Issue #13933 has been updated by akr (Akira Tanaka). I described that this is difficult to implement in https://bugs.ruby-lang.org/issues/19839#note-18. The problem is not only with -Float::INFINITY. There are many minimum values other than -Float::INFINITY : [], "", true, false, Object.new, etc. Of course, a user may define a class with a minimum value. Range#empty? should work with them. ---------------------------------------- Feature #13933: Add Range#empty? https://bugs.ruby-lang.org/issues/13933#change-104710 * Author: ted (Ted Johansson) * Status: Open * Priority: Normal ---------------------------------------- Range already responds to #size. It would be nice if it also responded to predicate #empty? :-) -- 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/postorius/lists/ruby-core.ml.ruby-lang.org/