Ruby 1.9: workaround changes in Array#to_s behavior
Ruby 1.9: workaround changes in Array#to_s behavior

There are plenty of places in the codebase where this behavior change
has impact, but this commit picks off some of the low-hanging fruit.

The problem is that Array, and therefore Walrat::ArrayResult, under 1.9
behavior like this:

  [].to_s      # => "[]"
  [1,2,3].to_s # => "[1, 2, 3]"

(Compare this to 1.8.7 where they returned "" an "123" respectively.)

In other words, Array#to_s is really now a debugging tool more than
anything else, behaving like #inspect. To fix this issue entirely will
probably have to make a number of changes in various parts of the
codebase, including in Walrat itself (particularly the Node class, which
does #to_s internally).

Signed-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>

wincent/walrus