Commit 2ed15df
committed
StringIO#pread: handle 0 length like IO#pread
If length is 0, IO#pread don't even try to read the IO,
it simply return the buffer untouched if there is one
or a new empty buffer otherwise.
It also doesn't validate the offset when length is 0.1 parent e3ea087 commit 2ed15df
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1602 | 1602 | | |
1603 | 1603 | | |
1604 | 1604 | | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
1605 | 1612 | | |
1606 | 1613 | | |
1607 | 1614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
753 | 760 | | |
754 | 761 | | |
755 | 762 | | |
| |||
0 commit comments