[MacRuby] #734: Mustache fails on call to render.
#734: Mustache fails on call to render. ----------------------------------------+----------------------------------- Reporter: larry@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: mustache ----------------------------------------+----------------------------------- Unable to render a Mustache template using the 'mustache' gem. Works as expected in Ruby 1.8.7. In MacRuby, programs freeze on the call to render. I tried using the macruby debugger to narrow the issue, but I could not. So I forked the mustache source on GitHub and it looks like Mustache::Template.render makes a recursive call that freezes MacRuby. -- Ticket URL: <http://www.macruby.org/trac/ticket/734> MacRuby <http://macruby.org/>
#734: Mustache fails on call to render. ----------------------------------------+----------------------------------- Reporter: larry@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: mustache ----------------------------------------+----------------------------------- Changes (by lsansonetti@…): * milestone: MacRuby 0.6 => Comment: We need a reduction for this problem. -- Ticket URL: <http://www.macruby.org/trac/ticket/734#comment:1> MacRuby <http://macruby.org/>
#734: Mustache fails on call to render. ----------------------------------------+----------------------------------- Reporter: larry@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: mustache ----------------------------------------+----------------------------------- Comment(by larry@…): Replying to [comment:1 lsansonetti@…]:
We need a reduction for this problem.
Mustache::Template.render contains the following code: def render(context) # Compile our Mustache template into a Ruby string compiled = "def render(ctx) #{compile} end" # Here we rewrite ourself with the interpolated Ruby version of # our Mustache template so subsequent calls are very fast and # can skip the compilation stage. instance_eval(compiled, __FILE__, __LINE__ - 1) # Call the newly rewritten version of #render render(context) end This produces an infinite loop in MacRuby. -- Ticket URL: <http://www.macruby.org/trac/ticket/734#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby