D
Dan Bensen
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"
....
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"
....