Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created July 21, 2011 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyanny/1096796 to your computer and use it in GitHub Desktop.
Save kyanny/1096796 to your computer and use it in GitHub Desktop.
exifr readlong wrapper
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