Created
January 23, 2015 15:12
-
-
Save bbrowning/cb59f764a697b93b5b6c to your computer and use it in GitHub Desktop.
JRuby 9k double loading file if explicit require and autoload are used
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
autoload :ProxyObject, 'proxy_object.rb' | |
require 'proxy_object' |
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
$ 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 |
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 ProxyObject < ::BasicObject | |
undef_method :== | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment