From: Kazuhiro NISHIYAMA Date: 2003-08-25T22:27:48+09:00 Subject: [ruby-dev:21259] Regexp#initialize が $SAFE==4 で落ちる 西山和広です。 http://mput.dip.jp:8080/mput/?date=20030825#p02 の話です。 rb_warnでwarningを表示しようとしたところでSecurityErrorに なっているようです。 % ruby-1.8.0 -ve '$SAFE=4;Regexp.new(//,Regexp::IGNORECASE)' ruby 1.8.0 (2003-08-04) [i386-cygwin] -e:1:in `write': Insecure operation `write' at level 4 (SecurityError) from -e:1:in `initialize' from -e:1:in `new' from -e:1 % ruby-1.8.0 -ve 'Regexp.new(//,Regexp::IGNORECASE)' ruby 1.8.0 (2003-08-04) [i386-cygwin] -e:1: warning: flags ignored % ruby-1.8.0 -vde '$SAFE=4;Regexp.new(//,Regexp::IGNORECASE)' ruby 1.8.0 (2003-08-04) [i386-cygwin] -e:1: exception reentered (fatal) % ruby-1.8.0 -vW0 -e '$SAFE=4;Regexp.new(//,Regexp::IGNORECASE)' ruby 1.8.0 (2003-08-04) [i386-cygwin] % -- |ZnZ(ゼット エヌ ゼット) |西山和広(Kazuhiro NISHIYAMA)