Closed the-spectator closed 9 months ago
This PR implements #to_s as an alias for #inspect. Previously, #to_s was printing File which is a bit misleading.
#to_s
#inspect
File
Before:
t = Tempfile.new t.to_s #=> #<File:0x0000000108d0c498>
After:
t = Tempfile.new t.to_s #=> #<Tempfile:/var/folders/rh/2d2lzkfn22sfmx5227bww_km0000gn/T/20230501-30515-b2tr67>
Ping for maintainers. Please help to suggest any improvements so I can make the patch acceptable. cc: @hsbt
Thank you for review and the merge 🙏 @hsbt !
This PR implements
#to_s
as an alias for#inspect
. Previously,#to_s
was printingFile
which is a bit misleading.Before:
After: