Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "requiring standard libs with save level 1"
>     on 03/06/09, Eugene Scripnik <Eugene.Scripnik / itgrp.net> writes:
> 
> |I've set up new version of Ruby from CVS and my programs failed to work.
> |ruby refuses to require standard libraries. Whats wrong?
> |Here is IRB snapshot:
> 
> irb does not work well with $SAFE >= 1.  This is known bug/feature.
I don't think this is irb bug/feature. I used IRB just for example. Now 
loot at this script:
(hoaz)~/proj>cat test.rb
#!/usr/local/bin/ruby

puts VERSION
puts RELEASE_DATE
$SAFE = 1

require 'digest/md5'
(hoaz)~/proj>ruby test.rb
1.8.0
2003-06-06
test.rb:7: warning: Insecure world writable dir 
/usr/local/lib/ruby/site_ruby/1.8, mode 040777
test.rb:7:in `require': loading from unsafe path 
/usr/local/lib/ruby/site_ruby/1.8:/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd4.7:/usr/local/lib/ruby/site_ruby:/usr/local/lib/ruby/1.8:/usr/local/lib/ruby/1.8/i386-freebsd4.7:. 
(SecurityError)
         from test.rb:7

-- 
Eugene Scripnik
IT Group
Software Architect
Tel./Fax +380 (372) 58-43-10
email: Eugene.Scripnik / itgrp.net
http://www.itgrp.net/