[ruby-core:114853] [Ruby master Feature#13933] Add Range#empty?

21 Sep
2023
21 Sep
'23
1:56 a.m.
Issue #13933 has been updated by nobu (Nobuyoshi Nakada). Dan0042 (Daniel DeLorme) wrote in #note-5:
```ruby (...-Float::INFINITY).empty? #=> true ```
How do you define this? `Range#empty?` must know if the element is a `Float`, and negative infinity? ---------------------------------------- Feature #13933: Add Range#empty? https://bugs.ruby-lang.org/issues/13933#change-104699 * 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/
722
Age (days ago)
722
Last active (days ago)
0 comments
1 participants
participants (1)
-
nobu (Nobuyoshi Nakada)