Skip to content

Instantly share code, notes, and snippets.

@duien
Created February 9, 2011 16:24
Show Gist options
  • Save duien/818746 to your computer and use it in GitHub Desktop.
Save duien/818746 to your computer and use it in GitHub Desktop.
builder fail
ruby-1.8.7-p302 > require 'builder'
=> true
ruby-1.8.7-p302 > xm = Builder::XmlMarkup.new
=> <inspect/>
ruby-1.8.7-p302 > xm.title('yada')
=> "<inspect/><title>yada</title>"
ruby-1.8.7-p302 > puts xm
TypeError: Builder::XmlMarkup#to_ary should return Array
from (irb):5:in `puts'
from (irb):5
ruby-1.8.7-p302 > xm
=> <inspect/><title>yada</title><respond_to?:to_ary/><to_ary/><inspect/>
ruby-1.8.7-p302 > xm
=> <inspect/><title>yada</title><respond_to?:to_ary/><to_ary/><inspect/><inspect/>
ruby-1.8.7-p302 > xm
=> <inspect/><title>yada</title><respond_to?:to_ary/><to_ary/><inspect/><inspect/><inspect/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment