Eric H. wrote:
$SAFE is switched when you assign to it, never at any other time.
Is it so? Consider the following code:
puts RUBY_VERSION, RUBY_PLATFORM
write': Insecure operationwrite’ at level 4
from safe.rb:5:in `show_safe’
You have code like $SAFE = 4 in your program somwhere. Use grep to
Not necessarily. See above.
Typically $SAFE = 4 is only set in a spawned thread since its so
strict its rarely useful outside of sandboxing dangerous code.