Security

Ruby is portable and can easily use code distributed across a network. This property gives you tremendous power and flexibility but introduces a commensurate burden: how do you use this capability without possibly causing damage?

Part of the answer lies in Ruby’s security system, which allows you to “lock down” the Ruby environment when executing code that may be suspect. Ruby calls such data and code tainted. This feature introduces mechanisms that allow you to decide how and when potentially “dangerous” data or code can be used inside your Ruby scripts.

Get Ruby in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.