toretore / zippy

rubyzip for dummies
MIT License
67 stars 7 forks source link

Looping with do/end broken in zipper templates #1

Closed jamieorc closed 12 years ago

jamieorc commented 13 years ago

Nice gem. However, I just found a bug using with Ruby 1.8.7, Rails 2.3.x. If you have a .zip.zipper template and create a loop with do/end an error is thrown. Replacing with curly braces fixes.

compile error:

app/views/collections/show.zip.zipper:10: syntax error, unexpected kENSURE, expecting kEND app/views/collections/show.zip.zipper:12: syntax error, unexpected $end, expecting kEND

Raises error:


@foo.bars.each do |bar|
  zip[bar.name] = bar.something
end

Works


@foo.bars.each {|bar|
  zip[bar.name] = bar.something
}