Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No, it is not guaranteed. The result of evaluating str.inspect and then passing it to eval will depend on the version of Ruby and any modifications made to the inspect or eval methods. In general, it is recommended to avoid using eval as much as possible for security reasons.