From: ara.t.howard@... Date: 2006-09-15T07:06:19+09:00 Subject: [OT] Re: not finding a breakpoint + values are nil On Fri, 15 Sep 2006, Dan Bensen wrote: > Ruby seems to be passing over a breakpoint in a class initialize function. > "Got grid" is the only break that occurs before the program hits a bug. What > is Grid.new doing, and how come the "Grid initialized" breakpoint wasn't > found or didn't work? > > grid after "Got grid": > => [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]] > > In file controllers/t3_controller.rb: > ... > grid = Grid.new(gridStr) > breakpoint "Got grid" > ... > > In file controllers/t3/t3lib.rb: > > module Cell > class Val < String > def isBlank > self == BLANK > end > end > BLANK = Val.new(' ') > end > > class Grid < Array > def initialize(array = ()) > super(3) { |row| Array.new(3,Cell::BLANK) } > breakpoint "Grid initialized" > ... if you haven't used narray you should check it out - it'll give you beautiful numerical grids with blinding speed in few lines of code... fyi. -a -- in order to be effective truth must penetrate like an arrow - and that is likely to hurt. -- wei wu wei