SketchUp / testup-2

TestUp 2 for SketchUp - A GUI wrapper for running Minitest in SketchUp
MIT License
26 stars 37 forks source link

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

Open MSP-Greg opened 1 year ago

MSP-Greg commented 1 year ago

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]
thomthom commented 1 year ago

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.