Commit d92b742
committed
Make putc signatures type-preserving overloads
Per review feedback, type `StringIO#putc` / `Zlib::GzipWriter#putc` as
`(real) -> real | (String) -> String` instead of a flat
`(Numeric | String) -> (Numeric | String)`. `putc` returns its argument,
so the overloads preserve the caller's type; `real` is also more precise
than `Numeric` since `putc` does not accept `Complex`.1 parent 51d27db commit d92b742
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1271 | 1271 | | |
1272 | 1272 | | |
1273 | 1273 | | |
1274 | | - | |
| 1274 | + | |
| 1275 | + | |
1275 | 1276 | | |
1276 | 1277 | | |
1277 | 1278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
0 commit comments