mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
interpreter (https://github.com/ruby/syntax_suggest/pull/266) * Prefer Ruby::Prism, the parser built into the interpreter Ruby 4.1 exposes 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). syntax_suggest is loaded when a script fails to parse, so it should not depend on the prism gem, which may be absent from the Gemfile under bundler. On Ruby 4.1+ use Ruby::Prism; on older Rubies keep requiring the prism gem. Every reference to Prism in syntax_suggest is lexically inside the SyntaxSuggest module, so defining SyntaxSuggest::Prism is enough and the call sites are untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Update lib/syntax_suggest/api.rb * Update CHANGELOG.md * Apply suggestion from @Earlopain --------- https://github.com/ruby/syntax_suggest/commit/e11b8842ff Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>