Created
May 13, 2015 21:48
-
-
Save glennpratt/270afdf12e579d5ad5b1 to your computer and use it in GitHub Desktop.
no require in threads
This file contains hidden or 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 Kernel | |
| alias_method :_aq_original_require, :require | |
| def require(name) | |
| fail 'No loading in threads!' if Thread.main != Thread.current | |
| _aq_original_require(name) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment