Builder - tag!('p') does not work?


#1

tag! ‘p’, {‘a’=>‘b’}
does not build up a <p a=“b”> element, but prints out the hash
instead.
Any idea why?

irb(main):001:0> require ‘builder’
=> false
irb(main):002:0> b1 = Builder::XmlMarkup.new
=>
irb(main):003:0> b2 = Builder::XmlMarkup.new
=>
irb(main):004:0> b1.tag!(‘p’, {‘a’=>‘b’})
{“a”=>“b”}
=> nil

irb(main):008:0> b2.tag!(‘p2’, {‘a’=>‘b’})
=> “<p2 a=“b”/>”
irb(main):009:0> p2