From: "nobu (Nobuyoshi Nakada) via ruby-core" Date: 2023-05-30T23:42:21+00:00 Subject: [ruby-core:113712] [Ruby master Feature#19698] Need an idiomatic way to define an empty range Issue #19698 has been updated by nobu (Nobuyoshi Nakada). What is your ���intention��� to use an ���empty��� range? And what do you think ���idiomatic��� way is? ---------------------------------------- Feature #19698: Need an idiomatic way to define an empty range https://bugs.ruby-lang.org/issues/19698#change-103363 * Author: shouichi (Shouichi KAMIYA) * Status: Open * Priority: Normal ---------------------------------------- It seems there is no idiomatic way to define an empty range. We can define empty ranges in several ways such as ``` ruby irb(main):001:0> (0...0).none? => true irb(main):002:0> (1...-1).none? => true ``` I think the above examples do not communicate the intention well. -- 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/