From: mortee Date: 2007-10-10T20:51:06+09:00 Subject: Re: will #in? be in ruby2? (was Re: Finding shared elements between to arrays.) David A. Black wrote: > Hi -- > > On Wed, 10 Oct 2007, mortee wrote: >> Why don't you just define #in? in Object yourself, and then you can use >> it anywhere in your code. That's something I really like about Ruby: if >> I'm missing something from a core or library class, I can just drop it >> in for my own use. > > It's not risk-free, though, since if two people define a given method > differently, one of them will get trampled on. Yeah, that's what the other thread "Open-Closed..." is about in part: method name collisions whithin a module/class coming from different sources. I think that this problem should be solved somehow instead of avoiding the power of ability to extend arbitrary classes. I'm absolutely aware of the issue though. mortee