From: Jake Date: 2002-12-11T09:15:41+09:00 Subject: Re: Seeking Ruby Samadhi Thanks everone. That was fast. It was the implicit call to self that was lost on me. Makes perfect sense now. Enlightenment! Sweet Enlightenment! I.. I.. I can see my house from here! :) Jake "Jake" wrote in message news:ffc7e549.0212101445.49ac9b7e@posting.google.com... > Hi all, > > First, here's a piece of working code that prints the values "1 2 3" > as one would expect: > > > class Array > def each2 > each {|value| puts value} > end > end > [1, 2, 3].each2 > > > **HOW IN THE NAME OF ALAN TURING DOES _each2_ PASS _value_ TO > _each_***?!?! I could see how it works if the string ".each2" were > literally replaced with ".each {|value| puts value}" (ala tcl), but > everything i think i know about method calls tells me that its > probably not that simple. > > > Thanks in advance for your assistance in helping me understand ruby! > Jake