Guest User

Untitled

a guest
May 27th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. module Safe
  2. def safe( level = 4 )
  3. result = nil
  4. if $SAFE < level then
  5. Proc.new {
  6. $SAFE = level
  7. result = yield
  8. }.call
  9. else
  10. result = yield
  11. end
  12. result
  13. end
  14. module_function :safe
  15. end
Add Comment
Please, Sign In to add comment