Please sign in to comment.
Fix warning when using yield in templates on ruby 2.7
Take the class of the scope, and pass it through the compilation methods. Call class_eval on the scope's class so that constant lookup works, and switch the singleton class opening to instance_exec. This radically simplifies the compiled template method code, and I would guess it speeds it up significantly as well. However, this approach can cause a memory leak if you are creating anonymous classes at runtime and then passing instances of those classes as the scope of the render.
- Loading branch information...