Hacker News new | ask | show | jobs
by psadauskas 221 days ago
I use it quite a bit when I have to monkeypatch a gem to backport a fix while I wait for a release:

    raise "check if monkeypatch in #{__FILE__} is still needed" if Gem::Version.new(Rails.version) >= Gem::Version.new("8.0.0")
This will blow up immediately when the gem gets upgraded, so we can see if we still need it, instead of it laying around in wait to cause a subtle bug in the future.