On Sat, 3 Feb 2001, Jim Freeze wrote: > I am using the Vector class. I am using Vector instead of Array because I > want to perform some math on the vectors. But, Vector doesn't seem to > support .each. How is one to iterate through a vector? > > irb(main):001:0> require 'matrix' > true > irb(main):002:0> v = Vector[1, 2, 3] > Vector[1, 2, 3] > irb(main):003:0> v.each {|i| puts i} > NameError: undefined method `each' for #<Vector:0x1c1368> > (irb):3:in `irb_binding' #map is available, though not having each does seem asymmetrical (there's #each2, #map, and #map2) and obviously #map is not exactly the same thing as #each. David -- David Alan Black home: dblack / candle.superlink.net work: blackdav / shu.edu Web: http://pirate.shu.edu/~blackdav