-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
The following code in main will change the console output of Arrays when loaded:
testup-2/src/testup/console.rb
Lines 53 to 66 in e32a68c
def puts(*args) | |
if args.empty? | |
write $/ | |
else | |
for arg in args | |
line = arg.to_s | |
write(line) | |
if line.empty? || !line.end_with?($/) | |
write($/) | |
end | |
end | |
end | |
nil | |
end |
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]
Metadata
Metadata
Assignees
Labels
No labels