mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Ruby 4.1 will expose the prism parser built into the interpreter as Ruby::Prism, and the prism gem becomes a bundled gem (https://bugs.ruby-lang.org/issues/22379). Ruby::Prism is the very parser that compiled the code, so use it for spotting nodes; the prism gem is not needed and may not be available under bundler. On older Rubies keep using the prism gem as before. The constant-path checks use Node#type instead of class comparisons so that they work with nodes of either module. https://github.com/ruby/error_highlight/commit/ae50da6cc4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>