Actions
Bug #17139
closed[doc] StringScanner#matched_size seems to be byte-oriented but that is not documented
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
Description
StringScanner#matched_size seems to be byte oriented. But that is not documented. Better be documented to avoid confusion.
[1] pry(main)> ss = StringScanner.new([1024].pack("U*"))
[3] pry(main)> ss.skip_until(/./)
[4] pry(main)> ss.matched_size
=> 2
[5] pry(main)> ss.matched.size
=> 1
Actions
Like0
Like0