From: Alex Date: 2009-06-03T04:27:11+09:00 Subject: Re: <, >, and ranges in a case statement. --001485ecf70a58744d046b628712 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit That's an interesting idea.. I can see an opportunity for a great deal of abuse there, as well. It would certainly be cool to write my infinite loops like: (0..Infinity).each {|d| ... } Alex On Tue, Jun 2, 2009 at 3:21 PM, Mark Thomas wrote: > On Jun 2, 9:32 am, Max Williams wrote: > > Clifford Heath wrote: > > > Brian Candler wrote: > > >> Simplest solution is to use a Range with extreme bounds, > > > > > ... such as a range that ends in Infinity: > > > > > 65..(1/0.0) > > > => 65..Infinity > > Interesting... you can assign it to a constant. > > Infinity = 1/0.0 > > Then you can use it in ranges: > > (-Infinity..0).include? 100000 > => false > (0..Infinity).include? 100000 > => true > > > --001485ecf70a58744d046b628712--