crafty icon indicating copy to clipboard operation
crafty copied to clipboard

Changed behaviour of empty arrays and hashes as content

Open jede opened this issue 14 years ago • 0 comments

Hi!

I ran in to the problem that the following:

ul do
  articles.each do |article|
    li article.title
  end
end

would result in:

    []

if articles was empty. Therefore I added a check so if the content has the method empty? and the method is true, it is represented as an empty string.

I also changed the Rakefile some, since it produced an error in the way it was written.

Best regards, Johannes Edelstam

jede avatar Aug 30 '11 11:08 jede