Skip to content

Fix RubyLex deprecation warning #1154

@bkuhlmann

Description

@bkuhlmann

Why

Hello. 👋 I'm running into deprecation warnings when using IRB where I see the following in my console:

warning: constant ::RubyLex is deprecated

How

The fastest way to reproduce this is by launching IRB from your console and running the following (ensure Ruby warnings are enabled too):

Object.constants.find { Object.const_get(it) == Ruby }

Notes

I'm using the following environment:

  • Ruby: ruby 4.0.0 (2025-12-25 revision 553f1675f3) +YJIT +PRISM [arm64-darwin24.6.0]
  • IRB: 1.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions