Skip to content

Process::Waiter is a private_constant on JRuby but not on MRI? #6857

@ivoanjo

Description

@ivoanjo

Hello hello! 👋

Environment Information

Provide at least:

  • JRuby version (jruby -v) and command line (flags, JRUBY_OPTS, etc): jruby 9.3.0.0 (2.6.8) 2021-09-17 85c20e780f OpenJDK 64-Bit Server VM 11.0.12+7-LTS on 11.0.12+7-LTS [darwin-x86_64]; --dev
  • Operating system and platform (e.g. uname -a): Darwin 19.6.0 Darwin Kernel Version 19.6.0: Thu Sep 16 20:58:47 PDT 2021; root:xnu-6153.141.40.1~1/RELEASE_X86_64 x86_64 i386 MacBookPro16,2 Darwin

Expected Behavior

Old versions of MRI had a crashing bug in Process::Waiter so I was writing some code to avoid touching such instances when I found them (by checking .is_a?(::Process::Waiter)).

I also added some test code, which worked fine on all MRI versions.

Actual Behavior

When I run my specs on JRuby, I get a NameError: private constant Process::Waiter referenced.


private_constant :Waiter was added deliberately in 087707e so this seems like a conscious decision, but the commit didn't mention why this was private on JRuby but not on MRI, so just in case I'd like to ask if that's correct :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions