From: Mauricio Fernandez Date: 2006-12-31T22:01:17+09:00 Subject: Re: Little Things On Sun, Dec 31, 2006 at 09:20:34PM +0900, dblack@wobblini.net wrote: > On Sun, 31 Dec 2006, Eric Hodel wrote: > >On Dec 31, 2006, at 24:04, Wilson Bilkovich wrote: > >>On 12/31/06, Rob Sanheim wrote: > >>>obj.send(:foo) # will call only public > >>>obj.send!(:foo) # will bypass private/protected, like the current send. > >>> > >>>reads better then funcall to me, at least. > >> > >>Yes please. That's perfect. > > > >No please. That doesn't match the behavior of any other #foo, #foo! that > >I know of. #send and #funcall match what the written methods look like > >perfectly. > > But #foo/#foo! behaviors don't have to match each other, except at the > very abstract level of one being "dangerous". I've always thought > that including private methods vs. not including them was a good > candidate for dangerous, but Matz didn't agree in this case so I don't > think it will happen. Actually, in 1.9 you have send, funcall, __send and __send!. These last ones might disappear at any time, but my hunch is that there's a chance they'll stay. But it's just the gut feeling of somebody who's been tracking Ruby 1.9 for a while and has seen features come by and go. Reading the sources/changelogs periodically can be tiresome, so I've been maintaining this change summary for some time: http://eigenclass.org/hiki.rb?Changes+in+Ruby+1.9#l22 -- Mauricio Fernandez - http://eigenclass.org - singular Ruby