testup-2 icon indicating copy to clipboard operation
testup-2 copied to clipboard

TestUp::Console#puts changes Ruby console output of Arrays

Open MSP-Greg opened this issue 1 year ago • 1 comments

The following code in main will change the console output of Arrays when loaded:

https://github.com/SketchUp/testup-2/blob/e32a68c5c02e2cbc3a924f40d4987faa05dbcc89/src/testup/console.rb#L53-L66

Without it loaded, puts [1,2,3] shows the following in the console:

1
2
3

With it loaded, Array#to_s is used, so it outputs:

[1,2,3]

MSP-Greg avatar Aug 02 '23 13:08 MSP-Greg

This change was made to output similar to Ruby itself.

It's something I've been meaning to get into SketchUp itself when we do a refresh of the Ruby Console.

thomthom avatar Sep 22 '23 10:09 thomthom