On the latest MRI 1.8.6, the code above leads to TypeError.
This also leads to a rubyspec failure for Array.
The proposed patch (with regression test) fixes the problem.
Description
Consider the following example:
[1, 2, 3].freeze.instance_eval { initialize }
On JRuby, this basically clears the frozen array.
On the latest MRI 1.8.6, the code above leads to TypeError.
This also leads to a rubyspec failure for Array.
The proposed patch (with regression test) fixes the problem.