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
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.

Show comment
Hide comment
@headius

headius Jan 20, 2016

Member

Hmm. I'll have a look.

Member

headius commented Jan 20, 2016

Hmm. I'll have a look.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Jan 20, 2016

Member

@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.

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.

Show comment
Hide comment
@dekellum

dekellum Jan 21, 2016

Contributor

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!

Contributor

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.

Show comment
Hide comment
@headius

headius Jan 21, 2016

Member

@dekellum Thanks for the confirmation!

Member

headius commented Jan 21, 2016

@dekellum Thanks for the confirmation!

@dekellum

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment