Project

General

Profile

Bug #19754

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

The message seems suitable when both of `offset` and `length` are given. 
 ```ruby 
 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. 


 ```ruby 
 IO::Buffer.for("test").get_string(5) #=> negative string size (or size too big) (ArgumentError) 
 ``` 

 https://github.com/ruby/ruby/pull/8016

Back