From: Ryan Davis Date: 2011-07-28T05:19:58+09:00 Subject: Re: How do we read this line of code? On Jul 27, 2011, at 11:53 , Chad Perrin wrote: > On Thu, Jul 28, 2011 at 03:24:08AM +0900, SW Engineer wrote: >> If we have the following line of Ruby code: >> >> @x.each do |x| >> >> - What does |x| represent here? > > It's an argument supplied to the block that follows. In this case, the > argument is an element of @x passed to the block. > > >> - How do we read the line (i.e; in English)? > > I'd probably read it as something like: > > For EACH element X of INSTANCE VARIABLE X, DO . . . It is not an instance variable.