Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible method lookup under Kernel.load(file,true), aka wrap, on 9.x #3609

Closed
dekellum opened this Issue Jan 20, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@dekellum
Copy link
Contributor

dekellum commented Jan 20, 2016

This problem is exposed on 9.x, as of 9.0.5.0-SNAPSHOT (7109a23) with its specific fix for #3180 in place. As the former was closed, opening this new issue. Using the test setup of:

https://github.com/dekellum/test-load-wrap (dekellum/test-load-wrap@44d50f9)

Note the NameError only on 9.0.5.0-SNAPSHOT in the output below:

% ruby -v loader.rb
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
Top level loader method called from loadee
The load(...,true) wrap option works

% jruby -v ./loader.rb 
jruby 1.7.24-SNAPSHOT (1.9.3p551) 2016-01-18 e7e3815 on OpenJDK 64-Bit Server VM 1.8.0_66-b17 +jit [linux-amd64]
Top level loader method called from loadee
The load(...,true) wrap option works

% jruby -v ./loader.rb 
jruby 9.0.5.0-SNAPSHOT (2.2.3) 2016-01-18 7109a23 OpenJDK 64-Bit Server VM 25.66-b17 on 1.8.0_66-b17 +jit [linux-amd64]
NameError: undefined local variable or method `bar' for main:Object
  <top> at /home/david/src/test-load-wrap/loadee.rb:1
   load at org/jruby/RubyKernel.java:955
  <top> at ./loader.rb:10
@headius

This comment has been minimized.

Copy link
Member

headius commented Jan 20, 2016

Hmm. I'll have a look.

dekellum added a commit to dekellum/syncwrap that referenced this issue Jan 20, 2016

@headius headius closed this in 7be804e Jan 20, 2016

@headius

This comment has been minimized.

Copy link
Member

headius commented Jan 20, 2016

@dekellum Thanks for the additional case. Perhaps you could turn it into a spec for https://github.com/ruby/spec? There's nothing testing this situation.

@dekellum

This comment has been minimized.

Copy link
Contributor Author

dekellum commented Jan 21, 2016

FWIW, I can confirm that jruby 9.0.5.0-SNAPSHOT (2.2.3) 2016-01-21 66107f3 fixes the test and my original application issue. Looking forward to seeing this latest variant error go away in Travis CI for the later:

https://travis-ci.org/dekellum/syncwrap/jobs/103912187#L210

Thanks!

@headius

This comment has been minimized.

Copy link
Member

headius commented Jan 21, 2016

@dekellum Thanks for the confirmation!

@dekellum

This comment has been minimized.

Copy link
Contributor Author

dekellum commented Jan 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.