Permalink
Browse files

Fix for ruby-head returning false to respond_to? for protected method…

…s, unless a second argument is given.
  • Loading branch information...
1 parent 33c8604 commit 9c74a4ffbc03bf1201e8416d1262aeefd629d43f @wvanbergen committed Jun 11, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/chunky_png/canvas/png_decoding.rb
  2. +1 −1 lib/chunky_png/canvas/png_encoding.rb
@@ -385,7 +385,7 @@ def decode_png_pixels_from_scanline_method(color_mode, depth)
else nil
end
- raise ChunkyPNG::NotSupported, "No decoder found for color mode #{color_mode} and #{depth}-bit depth!" unless respond_to?(decoder_method)
+ raise ChunkyPNG::NotSupported, "No decoder found for color mode #{color_mode} and #{depth}-bit depth!" unless respond_to?(decoder_method, true)
decoder_method
end
@@ -367,7 +367,7 @@ def encode_png_pixels_to_scanline_method(color_mode, depth)
else nil
end
- raise ChunkyPNG::NotSupported, "No encoder found for color mode #{color_mode} and #{depth}-bit depth!" unless respond_to?(encoder_method)
+ raise ChunkyPNG::NotSupported, "No encoder found for color mode #{color_mode} and #{depth}-bit depth!" unless respond_to?(encoder_method, true)
encoder_method
end

0 comments on commit 9c74a4f

Please sign in to comment.