nesquena / rabl

General ruby templating with json, bson, xml, plist and msgpack support
http://blog.codepath.com/2011/06/27/building-a-platform-api-on-rails/
MIT License
3.64k stars 334 forks source link

Duplicate locals hash when setting instance vars #689

Closed badosu closed 7 years ago

badosu commented 7 years ago

The Rabl engine mutates the locals hash when using it to set the instance variables for template rendering, this causes a RuntimeError when a frozen hash is passed.

Currently this requires a workaround to use Rabl as an engine with Roda's render plugin.

This fix also ensures the general case that might not be perceived currently due to local workarounds.

See: https://github.com/jeremyevans/roda/issues/115

nesquena commented 7 years ago

Thanks!

badosu commented 7 years ago

Thanks!