From: David Masover Date: 2008-08-08T12:27:55+09:00 Subject: Re: State of Ruby 1.8.6? On Thursday 07 August 2008 12:07:38 Gregory Brown wrote: > So if I write my code > against 1.8.7, my users need to upgrade. I guess it depends how much is really different in 1.8.7. For example, I really, really like Object#tap -- started using it in 1.9, and I see it's now in 1.8.7. But at work, we use 1.8.6. My solution: unless Object.new.respond_to? :tap Object.class_eval do def tap yield self self end end end The "unless" is because, of course, both 1.8.7 and 1.9 write this method in C, and I assume their version is faster than mine. I'd be much more concerned if there was 1.8.6 code that didn't run properly in 1.8.7, which I think is what started this discussion.