File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed
spec/tags/library/stringio Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -87,11 +87,7 @@ def print(*args)
87
87
def printf ( *args )
88
88
check_writable
89
89
90
- if args . size > 1
91
- write ( args . shift % args )
92
- else
93
- write ( args . first )
94
- end
90
+ write ( sprintf ( *args ) )
95
91
96
92
nil
97
93
end
Original file line number Diff line number Diff line change 1
1
fails:StringIO#printf formatting other formats s does not try to convert with to_str
2
- fails:StringIO#printf formatting other formats % is escaped by %
3
2
fails:StringIO#printf formatting flags # applies to format o does nothing for negative argument
4
3
fails:StringIO#printf formatting flags # applies to formats bBxX does nothing for zero argument
5
- fails:StringIO#printf formatting other formats % alone raises an ArgumentError
You can’t perform that action at this time.
0 commit comments