Skip to content

Instantly share code, notes, and snippets.

@hashrocketeer
Created May 17, 2013 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hashrocketeer/5602032 to your computer and use it in GitHub Desktop.
Save hashrocketeer/5602032 to your computer and use it in GitHub Desktop.
autoloading from a trap call raises ThreadError on ruby 2.0
module AutoloadBug
AutoLoadedConstant = 5
end
module AutoloadBug
autoload :AutoLoadedConstant, './auto_loaded_constant'
trap 'INT' do
puts AutoLoadedConstant
end
end
pid = fork { gets }
Process.kill 'INT', pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment