From: David Douthitt Date: 2005-07-13T01:50:50+09:00 Subject: Question: arrays v. ranges and *.each The results of the following code just seem strange to me: print "\nTry 1:" print [1..10].class, "\n" [1..10].each { |x| print x, "\n" } print "\nTry 2:" print [1..10].pop.class, "\n" [1..10].pop.each { |x| print x, "\n" } I would have thought that either 1) try 1 would output a sequence of numbers, and try 2 would result in an error (no such method Integer#each); or, 2) try 1 would output a series of numbers and try 2 would result in an error (no such method Range#pop). Perhaps - another option would be 3) try 1 would result in '1..10' and try 2 would result in something like '1..1' or an error? I'm confused...