Skip to content

Instantly share code, notes, and snippets.

@glennpratt
Created May 13, 2015 21:48
Show Gist options
  • Select an option

  • Save glennpratt/270afdf12e579d5ad5b1 to your computer and use it in GitHub Desktop.

Select an option

Save glennpratt/270afdf12e579d5ad5b1 to your computer and use it in GitHub Desktop.
no require in threads
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