For Programmers: Free Programming Magazines  


Home > Archive > Ruby > August 2005 > Re: Method behaves differently when called using #send









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Method behaves differently when called using #send
David A. Black

2005-08-28, 6:59 pm

Hi --

On Sat, 27 Aug 2005, Ron M wrote:

> David A. Black wrote:
>
>
>
>
>
> I guess one part of my question was more along the lines of
>
> "is it a bug or a feature I don't understand, that
> calling methods through "#send(:name)" vs ".name"
> seem to find different methods"


Certainly this:

ruby -e 'def x; end; x; send(:x)'

should never give you an ArgumentError, for any valid method name in
place of x. If it does, there's a bug somewhere.

If, however, something in your code, or code that yours loads, has
changed things, such that you get that error, then it's not a bug.

> Regarding the specifics of what weird stuff AR is doing,
> would this be a good place to ask, or would the rails
> mailing list be better?


Maybe -- you could try both.


David

--
David A. Black
dblack@wobblini.net


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com