Skip to content

jruby/vm integer messages fail on JRuby 10 due to Fixnum reference #9498

Description

@lloeki

jruby/vm still references Fixnum in JRuby::VM#send:

def send(obj)
  case obj
  when String
    @queue.put obj
  when Fixnum
    @queue.put obj
  end
end

On JRuby 10 / Ruby 3.4 semantics, Fixnum is undefined, so sending integer messages fails.

Minimal repro:

jruby -rjruby/vm -e 'JRuby::VM.send_message(JRuby::VM_ID, 1)'

Actual:

NameError: uninitialized constant JRuby::VM::Fixnum

This also breaks the documented/sample sub-VM pattern:

vm << JRuby::VM_ID

because JRuby::VM_ID is an integer.

Expected: integer messages should work.

Likely fix:

- when Fixnum
+ when Integer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions