Actions
Bug #11827
closedStringIO with set_encoding broken with enabled frozen string literal
Bug #11827:
StringIO with set_encoding broken with enabled frozen string literal
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0preview2 (2015-12-11 trunk 53028) [x86_64-darwin15]
Description
I'm not sure if this the following problem is an expected behavior. But I guess, it is a bug when I run the code below. It throws `set_encoding': can't modify frozen String (RuntimeError).
# frozen_string_literal: true
io = StringIO.new('')
io.set_encoding(Encoding::BINARY)
I wouldn't expect this kind of behavior.
Actions