From: deepjungle.maca@... Date: 2015-12-16T17:34:07+00:00 Subject: [ruby-core:72189] [Ruby trunk - Bug #11827] [Open] StringIO with set_encoding broken with enabled frozen string literal Issue #11827 has been reported by deepj #. ---------------------------------------- Bug #11827: StringIO with set_encoding broken with enabled frozen string literal https://bugs.ruby-lang.org/issues/11827 * Author: deepj # * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0preview2 (2015-12-11 trunk 53028) [x86_64-darwin15] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- 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. -- https://bugs.ruby-lang.org/