From: Brian Candler Date: 2008-12-03T20:14:37+09:00 Subject: Re: Question about op. overloading Maarten Mortier wrote: > What about > sudoku[r][c]= a > though? > > Is that possible? Simpler would be if you use sudoku[r,c] = a Just define your []= method to take 3 arguments. > And how woudl I get > > puts sudoku[][3] > > to return the third column? Again, your [] method can take 2 arguments. sudoku[nil,c] could be used to give the column. But I think a separate method for this makes more sense: sudoku.col(c) -- Posted via http://www.ruby-forum.com/.