Boolean comparison of array of strings in Ruby
- by Kyle Kaitan
I've got an array in Ruby that essentially represents a square boolean matrix. Dots represent zeroes, while any other character represents ones. Example:
irb(main):044:0> g
=> [".b", "m."] # This grid has two '1' values and two '0' values.
I'd like to perform a specified logical operation (say, OR) on this array with another similar array…