From: Shugo Maeda Date: 2007-12-22T12:22:08+09:00 Subject: [ruby-dev:32677] nil.freeze in date.rb This is a multi-part message in MIME format. --------------030207050901000309040908 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit 前田です。 1.9でYAMLがまともに動かないのですが、date.rbの中で(たぶん意図せずして) nil.freezeしているのが原因のようです。 添付のパッチでtest/yaml/test_yaml.rbが通ることを確認したのですが、 問題ないか確認いただけないでしょうか? > ふなばさん それはそれとして、syckが何でnilのインスタンス変数をセットしているのか が気になりますが…。 -- 前田 修吾 --------------030207050901000309040908 Content-Type: text/x-patch; name="date.rb.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="date.rb.diff" Index: lib/date.rb =================================================================== --- lib/date.rb (revision 14457) +++ lib/date.rb (working copy) @@ -250,7 +250,7 @@ ABBR_DAYNAMES = %w(Sun Mon Tue Wed Thu Fri Sat) [MONTHNAMES, DAYNAMES, ABBR_MONTHNAMES, ABBR_DAYNAMES].each do |xs| - xs.each{|x| x.freeze}.freeze + xs.each{|x| x.freeze unless x.nil?}.freeze end class Infinity < Numeric # :nodoc: --------------030207050901000309040908--