Skip to content

Releases: ruby/prism

v1.9.0

28 Jan 10:56
c0e3781

Choose a tag to compare

Added

  • Lots of work on the Ripper translation layer to make it more compatible and efficient.
  • Alias Prism::Node#breadth_first_search to Prism::Node#find.
  • Add Prism::Node#breadth_first_search_all/Prism::Node#find_all for finding all nodes matching a condition.

Changed

  • Fixed location of opening tokens when invalid syntax is parsed.
  • Fix RBI for parsing options.

v1.8.0

13 Jan 01:56
90c0578

Choose a tag to compare

Added

  • Optimize ruby visitor.
  • Report unterminated construct errors at opening token.

Changed

  • Correctly expose ripper state.
  • Use one file for versioned parser classes.
  • Fix denominator of rational float literal.
  • Decouple ripper translator from ripper library.
  • Sync Prism::Translation::ParserCurrent with Ruby 4.0.

v1.7.0

18 Dec 15:58
df55403

Choose a tag to compare

Added

  • Support 4.1 as a version option.
  • Add equal_loc to CallNode.
  • Add len()/is_empty() to ConstantList and NodeList in the Rust API.

Changed

  • Rename version 3.5 to version 4.0.
  • Fix compiling the gem from source on Windows.
  • Fix parsing of unary method calls like 42.~@.
  • Reject def f a, (b) = 1.
  • Reject endless method as a block parameter default.
  • Reject variable capture in alternative pattern.
  • Many fixes in regards to memory safety, found through fuzzing.
  • Many fixes to better handle invalid syntax, also found through fuzzing.
  • Fix the ruby version used by the ripper translator.
  • Fix ruby_parser translation comment processing.

v1.6.0

16 Oct 12:44
2924f8f

Choose a tag to compare

Added

  • Add support for passing "current" as the version option to Prism.* APIs.

Changed

  • Remove a compiler warning for a missing unsigned cast for a shift value.

v1.5.2

09 Oct 13:33
5446f7b

Choose a tag to compare

Changed

  • Fix character literal forced encoding when a unicode escape sequence is used.
  • Reject 1 if foo = bar baz.
  • Clear static literal flag on interpolated strings.
  • Reject optional argument/endless method definition ambiguity.

v1.5.1

13 Sep 14:03
914883a

Choose a tag to compare

Changed

  • Revert of a bug introduced with static literal flags on interpolated strings.

v1.5.0

13 Sep 14:02
b4865f9

Choose a tag to compare

Added

  • Add Prism::Translation::ParserCurrent.
  • Add Integer::to_u32_digits for the Rust API.
  • Add pm_comment_type_t field for the Rust API.
  • Support leading logical operators for CRuby 3.5+.

Changed

  • Mark Prism as ractor-safe.
  • Enforce a minimum version for the parser translation layer.
  • Many fixes to the parser translation layer.
  • Accept a newline after the defined? keyword.
  • Reject true && not true.
  • Make it = it assign nil to match parse.y behavior [Bug #21139].
  • Some fixes to the ruby parser translation layer.
  • Ensure call nodes have the correct ending location.
  • Reject foo && return bar.

v1.4.0

18 Mar 19:11
1463122

Choose a tag to compare

Added

  • Support 3.5 as a version option.
  • Many, many compatibility fixes for the parser translation layer.
  • Handle escapes in named capture names.
  • The freeze option is added to the various Prism:: APIs to deeply freeze the AST.
  • Properly support it for the parser and ruby_parser translation layers.
  • Track the then keyword on rescue nodes.
  • Add a multiple_statements? flag to parentheses nodes to support desired defined? behavior.

Changed

  • The strings used in the AST are now frozen.
  • Fixed handling escaped characters after control sequences in character literals.
  • Fix reading off the end of an unterminated global variable.
  • Raise a syntax error for defining []= with endless method syntax.
  • Increase value of PRISM_DEPTH_MAXIMUM to 10000.
  • Freeze Prism::VERSION.
  • Fix up rescue modifier precedence.

v1.3.0

21 Dec 19:57
439fd97

Choose a tag to compare

Added

  • Introduce Prism::StringQuery.
  • Introduce Prism::Relocation.
  • Track do keyword for WhileNode and UntilNode.
  • Change the way the gem is built to rely on mkmf instead of make.
  • Lots more documentation on node fields.

Changed

  • Properly add an error for def @foo; end.
  • Properly add an error for foo(**, *).
  • Fix up regression in string parsing in RubyParser translation.
  • Reject invalid dot method call after match expression.
  • Reject invalid operator after match expression.
  • Fix up %-literals delimited by newlines.
  • Properly add an error for -> { _1; -> { _1 } }.
  • Reject blocks and keywords in index writes.

v1.2.0

10 Oct 19:22
b08e569

Choose a tag to compare

Added

  • Introduce Prism::CodeUnitsCache.

Changed

  • Properly handle lexing global variables that begin with $-.
  • Properly reject invalid multi writes within parentheses.
  • Fix unary * binding power.
  • Set contains_keywords flag for implicit gets calls when -p is used.
  • Properly reject invalid non-associative operator patterns.
  • Do not warn about unused variables declared on negative lines.