From: nobu@... Date: 2017-02-21T15:35:38+00:00 Subject: [ruby-core:79648] [Ruby trunk Bug#13238][Closed] string.c assertion fails after attempting to modify singleton class of a frozen string Issue #13238 has been updated by Nobuyoshi Nakada. Status changed from Open to Closed Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: DONTNEED, 2.3: REQUIRED, 2.4: DONTNEED ---------------------------------------- Bug #13238: string.c assertion fails after attempting to modify singleton class of a frozen string https://bugs.ruby-lang.org/issues/13238#change-63064 * Author: Owen Stephens * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin14] * Backport: 2.2: DONTNEED, 2.3: REQUIRED, 2.4: DONTNEED ---------------------------------------- Hi, The following code causes an assertion failure in 2.3.3. Create two files, `bug.rb` and `not_frozen.rb`: bug.`rb`: ~~~ ruby s = 'abc'.freeze def s.something; end rescue nil require_relative 'not_frozen' ~~~ `not_frozen.rb`: ~~~ ruby 'abc' ~~~ And then run `ruby bug.rb` The output is: ~~~ Assertion failed: (RBASIC_CLASS(ret) == rb_cString), function register_fstring, file string.c, line 327. ~~~ Searching for the error message I see that this exact issue (#12923) has been fixed for Ruby 2.4.0 - please can this fix be back-ported to Ruby 2.3? Thanks, Owen. -- https://bugs.ruby-lang.org/ Unsubscribe: