[#46143] るびま 標準添付ライブラリ紹介 第3回のサンプル EUC-JPの結果 — eiichi_maekawa@...

62 messages 2009/07/02
[#46153] Re: るびま 標準添付ライブラリ紹介 第3回のサンプル EUC-JPの結果 — "NARUSE, Yui" <naruse@...> 2009/07/03

成瀬です。

[#46165] Re: に関する1.8.6→1.8.7または、1.9へのバージョンアップ — eiichi_maekawa@... 2009/07/05

前川です。

[#46281] rubyの変数の扱いについて — "前川 映一" <eiichi_maekawa@...> 2009/08/17

前川です。

[#46283] Re: rubyの変数の扱いについて — "(株)ネットフォレスト 植田裕之" <ueda@...> 2009/08/17

植田と申します。

[#46146] 文字変換 — eiichi_maekawa@...

16 messages 2009/07/03
[#46147] Re: 文字変換 — Hidetoshi NAGAI <nagai@...> 2009/07/03

永井@知能.九工大です.

[#46148] Re: 文字変換 — eiichi_maekawa@... 2009/07/03

前川です。

[ruby-list:46243] ruby-1.8.7で"Insecure: can't modify hash (SecurityError)"

From: Kazuhiko <kazuhiko@...>
Date: 2009-07-29 16:20:20 UTC
List: ruby-list #46243
こんにちは、かずひこです。

添付のように、最近のruby-1.8系でtDiaryのセキュアモード($SAFE=4)で
"Insecure: can't modify hash (SecurityError)"というエラーが起き、遡って
みると、

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=16081
Author: 	knu
Date: 	Sat Apr 19 11:11:25 2008 UTC (15 months, 1 week ago)
Log Message: 	

* array.c (rb_ary_equal, rb_ary_eql, rb_ary_hash, rb_ary_cmp):
  Make Array#eql?, #hash, #== and #<=> use rb_exec_recursive() and
  handle recursive data properly.

* hash.c (hash_equal, rb_hash_hash): Make Hash#eql?, #hash and #==
  use rb_exec_recursive() and handle recursive data properly.

↑この変更以降、このエラーが起きることがわかりました。

ちなみに、現在のruby_1_8ブランチの最新(rev.24312)に、上記の差分を逆適
応すれば、このエラーは起きません。sortで"can't modify hash"と言われるの
はバグのような気がするのですが、どうでしょうか?

状況報告だけですみませんが、どうぞよろしくお願いします。
かずひこ

In This Thread

Prev Next