Method behaves differently when called using #send

R

Ron M

I'm having difficulty using #send to call methods in
some of my classes. In the example shown below,
I can call the method "y" directly with no problems,
but when I try to call it using send I get an
ArgumentError.

ArgumentError: wrong number of arguments (0 for 1)
from (irb):7:in `y'
from (irb):7

Other methods seem to work just fine using send.

=> -84.2674903100158


This class happens to be an ActiveRecord class
and x and y came from columns in the database,
so unfortunately I don't really know what source
code I could post here to help track this down.

Can anyone think of what I could look for so I
can call y using send or where I should look for
further information to understand why it's not working?

Thanks,
Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top