From: Bob Showalter Date: 2005-11-29T01:15:11+09:00 Subject: Re: [BUG] string range membership Yukihiro Matsumoto wrote: > #include? used for range check, #member? was for set membership. But > since they have same functionality in Enumerable, some claimed having > different behaviors in Range was confusing. I agreed. > > | Anyway, please let me know if there is anything I can do to help > |settle this issue. > > All we need is making up good names for each functionality. How about something like Enumerable#produces?, or Enumerable#yields? Then perhaps start deprecating Enumerable#member? So for a range, one could use r.include?(obj) to test for obj between the endpoints, and r.yields?(obj) to test whether r.succ ever yields obj. Enumerable#=== becomes an issue (case statement), right?