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

Calling super() outside of a method causes NPE #4426

Closed
retoo opened this issue Jan 7, 2017 · 0 comments
Closed

Calling super() outside of a method causes NPE #4426

retoo opened this issue Jan 7, 2017 · 0 comments
Milestone

Comments

@retoo
Copy link
Contributor

@retoo retoo commented Jan 7, 2017

run the attached project, tested with 9.1.6.0 and master branch.

npesuper.tar.gz

jruby 9.1.6.0:

LoadError: load error: b -- java.lang.NullPointerException: null
  require at org/jruby/RubyKernel.java:959
   <main> at run.rb:5

plain ruby:

NoMethodError: super: no superclass method `' for Foo:Class
  method_missing at org/jruby/RubyBasicObject.java:1655
     <class:Foo> at foo.rb:2
          <main> at foo.rb:1

Workaround: don't call super within the class body :)

retoo added a commit to retoo/jruby that referenced this issue Jan 7, 2017
@kares kares closed this Jan 7, 2017
@kares kares added this to the JRuby 9.1.7.0 milestone Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.