Actions
Bug #19754
closed`IO::Buffer#get_string` raises unsuitable exception for too large offset
Bug #19754:
`IO::Buffer#get_string` raises unsuitable exception for too large offset
Description
The message seems suitable when both of offset and length are given.
IO::Buffer.for("test").get_string(5, 0) #=> Specified offset+length exceeds buffer size! (ArgumentError)
But without length, it doesn't seem to check offset properly.
IO::Buffer.for("test").get_string(5) #=> negative string size (or size too big) (ArgumentError)
Actions