Actions
Bug #11841
closedStringIO with read and `nil, ''` arguments broken with enabled frozen string literal
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-12-19 trunk 53195) [x86_64-darwin15]
Description
I'm not sure what behavior is expected here. But the following use case is used in rack (https://github.com/rack/rack/blob/master/test/spec_lint.rb#L496). If frozen string literal is enabled it throws `read': can't modify frozen String (RuntimeError), otherwise nothing.
# frozen_string_literal: true
io = StringIO.new('')
io.read(*[nil, ''])
Actions
Like0
Like0Like0Like0