From: "Richard D." Date: 2012-10-03T03:44:05+09:00 Subject: Re: how to read arrary with an array thanks for the replies, especially the thorough one from Jesus. What you explained was what I was thinking. I was expecting nil outputs. What I can't seem to figure out is how come I'm getting outputs between these codes: array1 = [['a','b'],[1, 2],['x','y']] array1.each do |ray| puts ray[0] #output a1x (expected and wanted) end puts "=======" array1.each do |ray| puts ray[1] #output b2y (expected and wanted) end puts "=======" #versus# array1.each do |ray| #four outputs of a, b1, 2x, y puts ray[0] puts '****' puts ray[1] end I was assuming I would get the same outcome. I'm not seeing difference other than being repeative between the two codes paragraphs(?). I suspect my lack of understanding my lie It should be noted, I'm not far enough in the book to have blocks explained, so are this point, in how it used, it's more a way to turn a method output into a variable, with will do something later. I know it's probably completely wrong. I'm on chapter 8 and I believe, blocs and procs are chapter 14. I literally started a week ago. And my experience of any kind of programming was more scripting for basic HTML (I believe version 2, whatever it was back in 1998) and bat files for DOS 6.22 that just made a nice interface to call up programs, which was around 1995/6. On a side note, I have not a clue of what slice is or what it does or does not do. Lastly, thanks for your patience in my learning process. -- Posted via http://www.ruby-forum.com/.