From: Caleb Clausen Date: 2009-12-20T04:57:35+09:00 Subject: Re: Suggestion of Array#=== which improves case/when behavio On 12/19/09, Rick DeNatale wrote: > I've been amazed by how subtly disruptive, seemingly simple changes > like the result of Array#to_s between Ruby 1.8 and 1.9 can be > http://talklikeaduck.denhaven2.com/2009/10/27/its-the-little-things I added this to my tests for 1.9 porting. It at least makes the Array#to_s problems readily apparent. Not intended as a permanent measure. if defined? ::RUBY_VERSION and ::RUBY_VERSION[/^\d+.\d+/].to_f>=1.9 class ::Array alias to_s_without_semantics_changed_warning to_s def to_s warn "calling Array#to_s from #{caller.first}; semantics have changed" to_s_without_semantics_changed_warning end end end