Skip to content

Instantly share code, notes, and snippets.

@ecoologic
Created February 3, 2015 04:16
Show Gist options
  • Save ecoologic/146be3c2379ed748d5b2 to your computer and use it in GitHub Desktop.
Save ecoologic/146be3c2379ed748d5b2 to your computer and use it in GitHub Desktop.
avoid getting screwed when you update a gem you monkey-patch
# If the behaviour the gem you're monkey patching changes
# your monkey patch might not work anymore
if Gem::Specification.all_names.detect { |gem_v| gem_v == 'haml-3.1.8' }
# my monkey patch here
else
raise "Please check this gem works with the above monkey patch"
end
@lucascaton
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment