[MacRuby] #734: Mustache fails on call to render.

MacRuby ruby-noreply at macosforge.org
Sat Dec 4 23:12:43 PST 2010


#734: Mustache fails on call to render.
----------------------------------------+-----------------------------------
 Reporter:  larry@…                     |       Owner:  lsansonetti@…        
     Type:  defect                      |      Status:  new                  
 Priority:  minor                       |   Milestone:                       
Component:  MacRuby                     |    Keywords:  mustache #reduction  
----------------------------------------+-----------------------------------
Changes (by mattaimonetti@…):

  * keywords:  mustache => mustache #reduction


Comment:

 Mustache does something nasty and overwrites its own method in the method
 body and calls it recursively.
 MacRuby doesn't support that kind of black magic (yet).

 Here is a reduction:

 {{{
 def foo(bar)
   puts 'calling original #foo'

   compiled = "def foo(baz); '#{bar}'; end"
   # overwiting the method we are in to call it again
   # from within itself
   instance_eval(compiled, __FILE__, __LINE__ - 1)
   foo(bar)
 end

 foo('foo:bar:baz')
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/734#comment:3>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list