How to Reduce the $SAFE Level (For Ruby Geeks Only)
By Peter Cooper / August 31, 2006
Eric Hodel has worked out a scary way to reduce Ruby's safe-level on the fly using a little inline C. Please don't use this in production code, it's just an experiment! That said, this could be a useful trick for things like Classroom and sandboxing environments.
Comments
-
Eric Hodel says:
September 2, 2006 at 11:25 pmJust an experiment? It works great!
-
Peter Cooper says:
September 3, 2006 at 1:29 pmExperiments can work ;-) I just don't think fiddling directly with Ruby's core is something that you'd want in non-experimental environments! Just my opinion, as always.. :)
Other Posts to Enjoy
-
Ruby’s Unary Operators and How to Redefine Their Functionality
Ruby’s Unary Operators and How to Redefine Their Functionality
-
The Split is Not Enough: Unicode Whitespace Shenigans for Rubyists
The Split is Not Enough: Unicode Whitespace Shenigans for Rubyists
-
The Mega Ruby News and Release Roundup for February 2012
The Mega Ruby News and Release Roundup for February 2012
-
A Lagom Review of O’Reilly’s ‘Sinatra Up and Running’
A Lagom Review of O’Reilly’s ‘Sinatra Up and Running’