diff --git a/lib/slim/splat/builder.rb b/lib/slim/splat/builder.rb index 84ecdc99..efbecb59 100644 --- a/lib/slim/splat/builder.rb +++ b/lib/slim/splat/builder.rb @@ -35,7 +35,11 @@ def attr(name, value) end if @attrs[name] if delim = @options[:merge_attrs][name] - @attrs[name] += delim + value.to_s + if @attrs[name].respond_to?(:+) + @attrs[name] += delim + value.to_s + else + @attrs[name] << delim + value.to_s + end else raise("Multiple #{name} attributes specified") end