Skip to content

Fix defined?(super) on BasicObject from causing NullPointerException#7782

Merged
enebo merged 1 commit intojruby:masterfrom
snoglobe:null_ptr_exception
May 4, 2023
Merged

Fix defined?(super) on BasicObject from causing NullPointerException#7782
enebo merged 1 commit intojruby:masterfrom
snoglobe:null_ptr_exception

Conversation

@snoglobe
Copy link
Contributor

@snoglobe snoglobe commented May 4, 2023

Related to ruby/ruby#7758

Stops defined?(super) on BasicObject from causing a NullPointerException and instead makes it return nil like expected

class BasicObject
  def nullPtr
    defined?(super)
  end
end

nullPtr

@enebo enebo added this to the JRuby 9.3.11.0 milestone May 4, 2023
@enebo
Copy link
Member

enebo commented May 4, 2023

I will cherry-pick this back to 9.3 once it lands because this will have the same issue.

@snoglobe Thanks for the fix!

@enebo enebo merged commit 51bd952 into jruby:master May 4, 2023
@enebo
Copy link
Member

enebo commented May 4, 2023

Fixed with aedc818 on jruby-9.3.

@snoglobe snoglobe deleted the null_ptr_exception branch May 4, 2023 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants