Created
July 21, 2011 08:35
-
-
Save kyanny/1096796 to your computer and use it in GitHub Desktop.
exifr readlong wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module EXIFR | |
class TIFF | |
class Data | |
if instance_methods.include?("readshort") | |
def readshort_with_rescue(pos) | |
readshort_without_rescue(pos) rescue nil | |
end | |
alias_method_chain :readshort, :rescue | |
end | |
if instance_methods.include?("readshort") | |
def readlong_with_rescue(pos) | |
readlong_without_rescue(pos) rescue nil | |
end | |
alias_method_chain :readlong, :rescue | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment