Issue #13933 has been updated by shan (Shannon Skipper).


Range mixes in Enumerable so you can use #none?.

~~~
('a'..'b').none? #=> false
('b'..'a').none? #=> true
~~~


----------------------------------------
Feature #13933: Add Range#empty?
https://bugs.ruby-lang.org/issues/13933#change-66860

* Author: ted (Ted Johansson)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
Range already responds to #size. It would be nice if it also responded to predicate #empty? :-)



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>