Skip to content

Commit

Permalink
fixes output problem with ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
badboy authored and defunkt committed Oct 4, 2009
1 parent 66d1f5e commit f1e736a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/mustache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def render_sections(template)
if ret.respond_to? :each
ret.map do |ctx|
render($2, ctx)
end
end.join
elsif ret
render($2)
else
Expand Down
6 changes: 3 additions & 3 deletions test/mustache_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

$LOAD_PATH.unshift File.dirname(__FILE__) + '/../examples'
require 'simple'
require 'complex'
require 'complex_view'
require 'view_partial'
require 'template_partial'
require 'escaped'
require 'unescaped'
require 'comments'

class MustacheTest < Test::Unit::TestCase
def test_complex
assert_equal <<-end_complex, Complex.to_html
def test_complex_view
assert_equal <<-end_complex, ComplexView.to_html
<h1>Colors</h1>
<ul>
<li><strong>red</strong></li>
Expand Down

0 comments on commit f1e736a

Please sign in to comment.