From: Charles Oliver Nutter Date: 2011-01-29T04:47:34+09:00 Subject: Re: why is overloading invalid in ruby. On Fri, Jan 28, 2011 at 11:41 AM, Adam Prescott wrote: > On Fri, Jan 28, 2011 at 5:13 PM, Charles Oliver Nutter > wrote: > >> And it would be even cooler if Ruby supported some form of type-driven >> pattern matching, so you could have different method bodies for >> different input types rather than checking them over and over again. >> But that's a post for another day :) >> > > Not very quackish. Neither are case/when statements like this: case obj when String ... when Regexp ... end But sometimes that's what you need to do. - Charlie