Skip to content

Instantly share code, notes, and snippets.

@zaphod42
Created September 13, 2013 18:55
Show Gist options
  • Select an option

  • Save zaphod42/6554631 to your computer and use it in GitHub Desktop.

Select an option

Save zaphod42/6554631 to your computer and use it in GitHub Desktop.
1.9.3p392 :001 > require 'puppet'
=> true
1.9.3p392 :002 > require 'puppet/network/http'
=> true
1.9.3p392 :003 > require 'puppet/network/http/handler'
=> true
1.9.3p392 :004 > class Foo
1.9.3p392 :005?> include Puppet::Network::HTTP::Handler
1.9.3p392 :006?> end
=> Foo
1.9.3p392 :007 > f = Foo.new
=> #<Foo:0x007feebc3552e8>
1.9.3p392 :008 > f.send(:decode_params, { "hi" => [1, 2] })
NoMethodError: undefined method `tr' for [1, 2]:Array
from /Users/andy/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/cgi/util.rb:16:in `unescape'
from /Users/andy/work/puppet/lib/puppet/network/http/handler.rb:266:in `block in decode_params'
from /Users/andy/work/puppet/lib/puppet/network/http/handler.rb:256:in `each'
from /Users/andy/work/puppet/lib/puppet/network/http/handler.rb:256:in `inject'
from /Users/andy/work/puppet/lib/puppet/network/http/handler.rb:256:in `decode_params'
from (irb):8
from /Users/andy/.rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in `<main>'
1.9.3p392 :009 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment