Forum: Ruby builder - tag!('p') does not work?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fe57662c550fb3cce44c398ddf2dd706?d=identicon&s=25 itsme213 (Guest)
on 2006-03-10 15:16
(Received via mailing list)
tag! 'p', {'a'=>'b'}
  does not build up a <p a="b"\> element, but prints out the hash
Any idea why?

irb(main):001:0> require 'builder'
=> false
irb(main):002:0> b1 =
=> <inspect/>
irb(main):003:0> b2 =
=> <inspect/>
irb(main):004:0> b1.tag!('p', {'a'=>'b'})
=> nil

irb(main):008:0> b2.tag!('p2', {'a'=>'b'})
=> "<inspect/><p2 a=\"b\"/>"
irb(main):009:0> p2
This topic is locked and can not be replied to.