B
Bill Kelly
Hi,
I'm wondering if this is a bug? When the proc is called, the
safe_level is reverting to zero:
$ cat safe-test4.rb
pr = lambda{ puts "my_safe_level=#{Thread.current.safe_level}" }
th = Thread.new(pr) do |pr_|
$SAFE = 4
pr_.call
end
th.join
$ ruby -v safe-test.rb
ruby 1.8.4 (2005-12-24) [i386-mswin32]
my_safe_level=0
If this isn't a bug, does anyone know why this behavior would
be desirable?
Thanks,
Regards,
Bill
I'm wondering if this is a bug? When the proc is called, the
safe_level is reverting to zero:
$ cat safe-test4.rb
pr = lambda{ puts "my_safe_level=#{Thread.current.safe_level}" }
th = Thread.new(pr) do |pr_|
$SAFE = 4
pr_.call
end
th.join
$ ruby -v safe-test.rb
ruby 1.8.4 (2005-12-24) [i386-mswin32]
my_safe_level=0
If this isn't a bug, does anyone know why this behavior would
be desirable?
Thanks,
Regards,
Bill