Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Ruby 2.0 will return false for respond_to? on protected methods #297

Merged
merged 1 commit into from

2 participants

@tenderlove

Ruby 2.0 will return false for respond_to? on protected methods unless true is passed for the second argument.

https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34580

@josh

Sweet, thanks!

@josh josh merged commit 142733b into sstephenson:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 20, 2012
  1. @tenderlove

    protected methods return false unless a second argument is passed to

    tenderlove authored
    respond_to?.  This only impacts trunk ruby, but will be included in Ruby
    2.0.
    
      https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34580
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/sprockets/directive_processor.rb
View
2  lib/sprockets/directive_processor.rb
@@ -126,7 +126,7 @@ def directives
@directives ||= header.lines.each_with_index.map { |line, index|
if directive = line[DIRECTIVE_PATTERN, 1]
name, *args = Shellwords.shellwords(directive)
- if respond_to?("process_#{name}_directive")
+ if respond_to?("process_#{name}_directive", true)
[index + 1, name, *args]
end
end
Something went wrong with that request. Please try again.