From: dblack@... Date: 2006-09-28T09:11:48+09:00 Subject: Re: String starts? and ends? methods Hi -- On Thu, 28 Sep 2006, Hal Fulton wrote: > dblack@wobblini.net wrote: >> >> It's a little inconsistent: >> >> obj.respond_to? # second person >> obj.is_a? # third person >> >> But I think second person is the most common. Or maybe are_a? just >> sounded too weird :-) >> > > As the other cases are using the infinitive form, > the latter would actually be #be_a? :) I think it's the second person -- at least, I seem to remember Matz explaining it that way. So you're asking the object: [do you] respond_to?... We could go old school: obj.respondest_to? obj.art_a? :-) David -- David A. Black | dblack@wobblini.net Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org