From: hal9000@... Date: 2000-07-17T18:29:07+00:00 Subject: [ruby-talk:04093] Possible new bit of syntax sugar? In conjunction with a "set" class I've been playing with, I added a method called "in" to Object, so that I could use the "natural" notation instead of the "backwards" one. E.g.: 'if x.in s' instead of 'if s.include? x' Of course, it would really look nicer without the dot: if x in s I'm thinking that this could be defined to call the include? method for the receiver (and thus would work with arrays or anything else that had an include? method -- e.g., 'if item in mybinarytree' ...) Also: I've noticed that there is a member? method for ranges and an include? method for arrays. I realize that conceptually these are very different things, but still... I wonder if it would be helpful to alias include? to member? for ranges (especially in light of the above idea)? Just a thought... Hal -- Hal Fulton Sent via Deja.com http://www.deja.com/ Before you buy.