Commit a997cb1
Fix error handling when parsing XML via IO.pipe
## Why?
If via IO.pipe, `IOError` exception is not raised, but `Errno::ESPIPE` or `Errno::EPIPE` or `Errno::EINVAL` exception is raised.
- CRuby
```
@er_source.pos
#=> Errno::ESPIPE Exception: Illegal seek
```
- CRuby (Windows (Ruby 2.6 or earlier))
```
@er_source.pos
#=> Errno::EINVAL: Invalid argument
```
- JRuby
```
@er_source.pos
#=> Errno::EPIPE: Broken pipe - No message available
```
Co-authored-by: Sutou Kouhei <[email protected]>1 parent 20562ec commit a997cb1
2 files changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 9 | + | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| |||
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
24 | 40 | | |
25 | 41 | | |
26 | 42 | | |
| |||
0 commit comments