From: deepjungle.maca@... Date: 2015-12-18T16:33:29+00:00 Subject: [ruby-core:72367] [Ruby trunk - Bug #11841] [Open] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal Issue #11841 has been reported by deepj #. ---------------------------------------- Bug #11841: StringIO with read and `nil, ''` arguments broken with enabled frozen string literal https://bugs.ruby-lang.org/issues/11841 * Author: deepj # * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- 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, '']) ~~~ -- https://bugs.ruby-lang.org/