You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So in our code, we have a .haml partial below with several local variables: link, mp_action, and text:
.link.flat-box
%a.btn.action.participants-btn{href: link, data: {mp_position: 'Leaderboard', mp_action: mp_action}}
= text
In a parent view file, we (incorrectly) render the partial like so, missing the local variable mp_action:
= render partial: 'v2/activities/partials/participants_button', locals: {link: "#createjoin", text: 'Create or Join A Team'}
When executing this code on Ruby 1.9.3-p392 with Thin 1.5.0, this behaves correctly: it raises a NameError exception that the local variable mp_action is undefined.
However, when executing this in Ruby 2.0.0-p195 (on OSX 10.8.3), this code causes the process to go into 100% CPU, and its memory usage will continuously grow past 1 GB and more. This happens regardless of server (Thin 1.5.0, Unicorn 4.6.3, Passenger 4.0.5). Additionally, if I comment out the lines within that partial, this will go through just fine. This is also happening onto our staging server as well (Ubuntu 12.04 LTS). I've replaced the haml partial with an equivalent ERB one; still same effects.