From: wojtek@...4chu.net Date: 2008-03-13T02:59:55+09:00 Subject: a method that checks if an object is in a range Hi, I wonder if there is a built-in method which does just like: range.include?(obj) but for the obj object. I came up with something like: module Comparable def in?(range) range.in?(self) end end 1.in? (1..10) # => true Of course I can use the range.include? syntax, but I find the second approach more convenient :) Regards, m4chu