On 12 jan, 23:06, Tim Hunter <TimHun... / nc.rr.com> wrote: > blondinet wrote: > > On 12 jan, 22:00, "ara.t.howard" <ara.t.how... / gmail.com> wrote: > >> On Jan 12, 2008, at 10:54 AM, blondinet wrote: > > >>> Any idea ? > >> [] method can't take block unless you do > > >> A.send '[]' do > >> end > > >> a @http://drawohara.com/ > >> -- > >> sleep is the best meditation. > >> h.h. the 14th dalai lama > > > Thanks for your response. However, I do not really understand why such > > a behavior : for me, Class[] is just a shortcut for Class.[], which is > > just a shortcut for Class.send '[]' ... Where am I wrong ? > > Ruby's parser doesn't allow a block to follow []. > > -- > RMagick:http://rmagick.rubyforge.org/ > RMagick 2:http://rmagick.rubyforge.org/rmagick2.html Hello Tim, thank you for your response. However I think it is a bit erroneous, since in my example, "A.[] do |a|" works !! Anyway, I will go with it, even if it is the first time that I find Ruby a bit incoherent, and I would like to know why ... (sigh) P.S : by the way, Tim, thanks for your work on RMagick, it is quite helpfull !! You may find interesting the following link http://xrvg.rubyforge.org/, even if it just a beginning :-(