[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>

Hi,

15 messages 2017/02/15

[ruby-core:79638] [Ruby trunk Bug#13238] string.c assertion fails after attempting to modify singleton class of a frozen string

From: owen@...
Date: 2017-02-20 23:50:01 UTC
List: ruby-core #79638
Issue #13238 has been reported by Owen Stephens.

----------------------------------------
Bug #13238: string.c assertion fails after attempting to modify singleton class of a frozen string
https://bugs.ruby-lang.org/issues/13238

* Author: Owen Stephens
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin14]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
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: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next