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

retoo opened this Issue Jan 7, 2017 · 0 comments


None yet

2 participants

retoo commented Jan 7, 2017

run the attached project, tested with and master branch.



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

plain ruby:

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

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

@retoo retoo added a commit to retoo/jruby that referenced this issue Jan 7, 2017
@retoo retoo Don't allow null method names
Solves #4426
@kares kares closed this Jan 7, 2017
@kares kares added this to the JRuby milestone Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment