lib/haml/helpers/action_view_mods.rb in haml-4.0.3 vs lib/haml/helpers/action_view_mods.rb in haml-4.0.4

- old
+ new

@@ -47,14 +47,14 @@ if !buffer.empty? buffer elsif value.is_a?(String) value else - '' + nil end # NonCattingString is present in Rails less than 3.1.0. When support # for 3.0 is dropped, this can be removed. - return ActionView::NonConcattingString.new(str) if defined?(ActionView::NonConcattingString) + return ActionView::NonConcattingString.new(str) if str && defined?(ActionView::NonConcattingString) return str else capture_without_haml(*args, &block) end end \ No newline at end of file