Skip to content

Instantly share code, notes, and snippets.

@bbrowning
Created January 23, 2015 15:12
Show Gist options
  • Save bbrowning/cb59f764a697b93b5b6c to your computer and use it in GitHub Desktop.
Save bbrowning/cb59f764a697b93b5b6c to your computer and use it in GitHub Desktop.
JRuby 9k double loading file if explicit require and autoload are used
autoload :ProxyObject, 'proxy_object.rb'
require 'proxy_object'
$ jruby double_load.rb
NameError: Undefined method == for class 'ProxyObject'
undef_method at org/jruby/RubyModule.java:2439
(root) at /home/bbrowning/tmp/jruby9kdoubleload/proxy_object.rb:2
(root) at /home/bbrowning/.rbenv/versions/jruby-9.0.0.0-pre1/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
require at org/jruby/RubyKernel.java:954
require at /home/bbrowning/.rbenv/versions/jruby-9.0.0.0-pre1/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
__script__ at double_load.rb:2
class ProxyObject < ::BasicObject
undef_method :==
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment