Actions
Bug #18077
closedMarshal.dump(closed_io) raises IOError instead of TypeError
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-08-16T08:00:19Z master a8714b83c4) [x86_64-linux]
Description
Marshal.dump is expected to raise a TypeError
for unmarshallable objects. But closed streams raise an IOError
:
$ ruby -e "io=IO.pipe.first; io.close; Marshal.dump(io)"
-e:1:in `internal_encoding': closed stream (IOError)
from -e:1:in `dump'
from -e:1:in `<main>'
This issue is present in all current ruby versions.
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0