sandboxes?
On Ruby 1.9, use BasicObject. On Ruby 1.8, use Jim W.'s
BlankSlate object. I recently ran into an issue with blankslate
though where it was incorrectly revealing methods, so you might want
to use my patched version:
Take this with a shaker of salt though, I mainly modified the example
to show off certain dynamic programming techniques in my book[0], and
not necessarily to make it robust. I have emailed Jim about these
changes, but he hasn’t gotten back to me yet.
Take this with a shaker of salt though, I mainly modified the example
to show off certain dynamic programming techniques in my book[0], and
not necessarily to make it robust. I have emailed Jim about these
changes, but he hasn’t gotten back to me yet.
Sorry for the shameless plug, but it’s directly relevant to the OP’s
questions since I cover these topics in the book, and it will be under
a creative commons license 9 months after it hits the shelves.
-greg
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.