Created
July 25, 2014 11:45
-
-
Save apeiros/dde74fa93019c378cab2 to your computer and use it in GitHub Desktop.
Mark code as unreachable
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
class Unreachable < StandardError | |
end | |
module Kernel | |
module_function def unreachable(msg="This place in the code should never have been reached") | |
raise Unreachable, msg | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment