Issue #20136 has been updated by Dominic Cleal.

Status changed from Unreviewed to In Topic Branch Pending Review
Assignee set to Dominic Cleal
Target version set to 3.2.0
Branch set to https://github.com/puppetlabs/puppet/pull/1586

----------------------------------------
Bug #20136: Array#respond_to? monkey patch doesn't accept include_private 
argument
https://projects.puppetlabs.com/issues/20136#change-88888

* Author: Dominic Cleal
* Status: In Topic Branch Pending Review
* Priority: Normal
* Assignee: Dominic Cleal
* Category: 
* Target version: 3.2.0
* Affected Puppet version: development
* Keywords: 
* Branch: https://github.com/puppetlabs/puppet/pull/1586
----------------------------------------
The monkey patch provided for Array#respond_to? doesn't accept the optional 
include_private argument to the method.  This causes problems in ActiveRecord 
for example:

    ActionView::Template::Error: wrong number of arguments (2 for 1)
        
/home/dcleal/code/puppet/puppet/lib/puppet/util/monkey_patches.rb:143:in 
`respond_to?'
        
/home/dcleal/.rvm/gems/ruby-1.9.3-p392@foreman/gems/activerecord-3.2.13/lib/active_record/associations/collection_proxy.rb:73:in
 `respond_to?'

The patch was added in #11331, commit f1071a6cf.

    lib/puppet/util/monkey_patches.rb:
    142   # @see #to_hash   
    143   def respond_to? m
    144     return false if m == :to_hash
    145     super
    146   end

ruby docs: http://www.ruby-doc.org/core-1.9.3/Object.html#method-i-respond_to-3F


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to