Hi -- On Wed, 22 Feb 2006, George Ogata wrote: > Emiel van de Laar <emiel / rednode.nl> writes: > >> Hi List, >> >> In trying to get rubygems working with 1.9 I ran accross an error >> regarding the method "Module#define_method". Investigating further >> using the ri documentation I found out that the sample code >> (specifically the "send hack") doesn't work anymore with 1.9. >> >> Can someone give me an indication of how things have changed. Perhaps >> then we can update the documentation as well. > > In current 1.9, #send can't call private methods (unless called > without a receiver). Instead #funcall was added to have the > functionality that #send used to have. You'll need to use #funcall > instead of #send. I'm still not happy about #funcall. How is one supposed to remember which (#send or #funcall) is which? There are a few things in Ruby where "you just have to memorize it" -- like the true/false arguments to #instance_methods, or the differences between Proc.new and lambda. I've always felt that these are soft spots in the language. #send/#funcall seems to me to be in the same category. Also, are methods now also called functions? That would be a pretty huge change in terminology. #funcall just doesn't seem like a good fit. David -- David A. Black (dblack / wobblini.net) Ruby Power and Light (http://www.rubypowerandlight.com) "Ruby for Rails" chapters now available from Manning Early Access Program! http://www.manning.com/books/black