Project

General

Profile

Actions

Bug #409

closed

Can't modify frozen ... の型

Added by shyouhei (Shyouhei Urabe) over 14 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
ruby -v:
Backport:

Description

=begin
ちゃんとrescueしてたはずのCan't modify frozen なんとか例外が捕捉で
きなくなってて気づいたのですが、1.9ではRuntimeErrorになっています。

% trunk/bin/ruby -e'[].freeze.clear'
-e:1:in clear': can't modify frozen array (RuntimeError) from -e:1:in '

むろん1.8ではTypeErrorです。

ruby_1_8/bin/ruby -e'[].freeze.clear'
-e:1:in `clear': can't modify frozen array (TypeError)
from -e:1

なにか理由があるのでしょうか?
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0