Change log
master (unreleased)
1.48.0 (2025-11-08)
New features
#391 : Support Ruby 4.0 (experimental). (@koic )
1.47.1 (2025-09-21)
Bug fixes
#386 : Fix parsing of node patterns that match against the empty string. (@earloapin )
1.47.0 (2025-09-19)
New features
1.46.0 (2025-07-16)
New features
Bug fixes
1.45.1 (2025-06-08)
Bug fixes
#382 : Fix an error when using Parser gem with prism_result. (@koic )
1.45.0 (2025-06-03)
New features
#381 : Support AST::Node#any_match_pattern_type? method. (@koic )
1.44.1 (2025-04-11)
Bug fixes
1.44.0 (2025-04-03)
New features
1.43.0 (2025-03-25)
Changes
1.42.0 (2025-03-25)
New features
#370 : Support Prism::Translation::Parser35 for Ruby 3.5 parser (experimental). (@earlopain , @koic )
1.41.0 (2025-03-21)
New features
1.40.0 (2025-03-19)
Changes
#354 : Use Prism::Translation::Parser::Builder when parsing with prism. (@earlopain )
1.39.0 (2025-03-16)
New features
#359 : Enable reusable Prism parse result. (@koic )
1.38.1 (2025-02-25)
Bug fixes
#360 : Fix an error when the Array core class contains a writer method before rubocop-ast loaded. (@earlopain )
1.38.0 (2025-01-27)
New features
#346 : Add Node#loc? to determine if a node has a given location. (@dvandersluis )
#356 : Added :any_block as an alias for :block and :numblock, use it with Node#any_block_type?. Also available in node patterns: {block numblock} can become any_block. (@earlopain )
Bug fixes
#323 : Fix node captures inside of ?, +, and * repetition. (@earlopain )
Changes
#357 : Support node groups in Node#each_descendant and similar traversal methods. (@earlopain )
1.37.0 (2024-12-13)
New features
Changes
#343 : Add StrNode#single_quoted?, StrNode#double_quoted? and StrNode#percent_literal? to simplify checking for string delimiters. (@dvandersluis )
1.36.2 (2024-11-27)
Bug fixes
1.36.1 (2024-11-13)
Bug fixes
#339 : Do not emit a deprecation warning for EnsureNode#body to give RuboCop a chance to update its usage. EnsureNode#body will still be changed in the next major version of rubocop-ast. (@earlopain )
1.36.0 (2024-11-13)
Changes
#337 : Deprecate EnsureNode#body in favour of EnsureNode#branch. EnsureNode#body will be redefined in the next major version of rubocop-ast. (@dvandersluis )
1.35.0 (2024-11-11)
New features
Changes
1.34.1 (2024-11-07)
New features
Bug fixes
#331 : [Fix #331] Fix crash in OpAsgnNode#name when the lhs is a send or csend node. (@dvandersluis )
1.34.0 (2024-11-04)
New features
#326 : Introduce lhs and rhs aliases to assignment nodes for consistency. (@dvandersluis )
1.33.1 (2024-11-02)
Bug fixes
#325 : Allow non_bare_access_modifier_declaration? to handle modifiers with multiple arguments. (@dvandersluis )
1.33.0 (2024-10-29)
New features
1.32.3 (2024-09-05)
Bug fixes
1.32.2 (2024-09-02)
1.32.1 (2024-08-17)
Changes
1.32.0 (2024-08-05)
New features
1.31.3 (2024-04-29)
Bug fixes
#289 : Fix an error during parsing when encountering unknown encodings in the encoding magic comment. (@Earlopain )
1.31.2 (2024-03-08)
Bug fixes
#286 : Improve error message for invalid parser_engine value. (@Earlopain )
1.31.1 (2024-03-01)
Changes
#282 : Remove Prism from runtime dependency. (@koic )
1.31.0 (2024-02-29)
New features
#277 : Support Prism as a Ruby parser (experimental). (@koic )
#276 : Support Parser::Ruby34 for Ruby 3.4 parser (experimental). (@koic )
Changes
#279 : (Compatibility) Drop Ruby 2.6 runtime support. (@koic )
#272 : Make Node#left_curly_brace? aware of lambda brace. (@koic )
1.30.0 (2023-10-26)
New features
1.29.0 (2023-06-01)
1.28.1 (2023-05-01)
Bug fixes
#262 : Fix an error when parsing non UTF-8 frozen string. (@koic )
1.28.0 (2023-03-24)
New features
#259 : Add forwarded_kwrestarg node to AST::Builder. (@koic )
1.27.0 (2023-02-27)
New features
#229 : Add source_range method to NodePattern. (@koic )
1.26.0 (2023-02-11)
New features
#255 : Make Node#class_constructor? aware of Ruby 3.2's Data.define. (@koic )
#255 : Make Node#class_construcor? aware of Ruby 2.7's numbered parameters. (@koic )
1.25.0 (2023-02-11)
New features
#256 : Support Parser::Ruby33 for Ruby 3.3 parser (experimental). (@koic )
1.24.1 (2022-12-29)
1.24.0 (2022-11-30)
New features
#245 : Add node types forwarded_restarg and forwarded_kwrestarg. (@ydah )
1.23.0 (2022-10-21)
New features
#242 : Add character_literal? to StrNode. (@koic )
1.22.0 (2022-10-17)
New features
#240 : Add a type predicate new_line? to Token. (@tdeo )
1.21.0 (2022-08-08)
New features
1.20.1 (2022-08-07)
New features
1.20.0 (2022-08-07)
Bug fixes
#230 : Make RegexpNode aware of fixed-encoding regopt. (@koic )
1.19.1 (2022-07-10)
New features
1.18.0 (2022-05-13)
New features
#233 : Make parse from Ruby 1.9 to 2.3 available. (@koic )
Changes
#232 : (Compatibility) Drop support for Ruby 2.5. (@koic )
1.17.0 (2022-04-09)
New features
#227 : Make Node#condition? aware of case-match node. (@koic )
1.16.0 (2022-02-21)
New features
#223 : Support Parser::Ruby32 for Ruby 3.2 parser (experimental). (@koic )
1.15.2 (2022-02-12)
Bug fixes
1.15.1 (2021-12-27)
Bug fixes
#10220 : Make AST::Node#receiver aware of csend block method calls. (@koic )
1.15.0 (2021-12-12)
New features
#10219 : Add value_omission method to AST::PairNode for Ruby 3.1's hash value omission. (@koic )
1.14.0 (2021-12-02)
New features
#218 : Support Ruby 3.1's anonymous block forwarding syntax. (@koic )
1.13.0 (2021-11-07)
New features
#213 : Make Node#numeric_type? aware of rational and complex literals. (@koic )
1.12.0 (2021-09-27)
Bug fixes
#208 : Update MethodDispatchNode#block_literal? to return true for numblocks. (@dvandersluis )
1.11.0 (2021-08-24)
New features
#205 : Make class, module, and struct definitions aware of numblock. (@koic )
1.10.0 (2021-08-12)
New features
1.9.1 (2021-08-10)
Bug fixes
1.9.0 (2021-08-06)
New features
1.8.0 (2021-07-14)
New features
#192 : Add branches method for AST::CaseMatchNode. (@koic )
Changes
1.7.0 (2021-05-28)
New features
#171 : Add SendNode#def_modifier that returns the def node it modifies, or nil. (@marcandre )
#186 : Add pattern method for AST::InPatternNode node. (@koic )
1.6.0 (2021-05-26)
New features
1.5.0 (2021-05-02)
New features
#182 : Support Parser::Ruby31 for Ruby 3.1 parser (experimental). (@koic )
1.4.2 (2021-05-02)
Bug fixes
#179 : Have ast_with_comments distinguish nodes with same content. (@marcandre )
1.4.1 (2021-01-23)
Changes
1.4.0 (2021-01-01)
Changes
#162 : Improve compatibility with parser 3.0. Turn on emit_match_pattern switch. (@marcandre )
1.3.0 (2020-11-30)
Changes
#156 : NodePattern now considers constant names to refer to constants (instead of predicate #Example_type?). (@marcandre )
1.2.0 (2020-11-24)
New features
#154 : Add ArgNode and Procarg0Node ("modern" mode), and add ArgsNode#argument_list to get only argument type nodes. (@dvandersluis )
Changes
1.1.1 (2020-11-04)
Bug fixes
#146 : Fix IfNode#branches to return both branches when called on ternary conditional. (@fatkodima )
1.1.0 (2020-10-26)
New features
1.0.1 (2020-10-23)
Bug fixes
1.0.0 (2020-10-21)
Changes
None since 0.8; official 1.0 release coinciding with RuboCop 1.0 and API considered stable. (@marcandre )
0.8.0 (2020-10-12)
New features
Bug fixes
0.7.1 (2020-09-28)
Bug fixes
0.7.0 (2020-09-27)
New features
Changes
#22 : (Potentially breaking) Most constants are now private, the rest are converted to Sets and meant to be private. (@marcandre )
0.6.0 (2020-09-26)
New features
0.5.1 (2020-09-25)
Bug fixes
#120 : (Potentially breaking) Fix false positives and negatives for SendNode#macro?. This impacts {non_}bare_access_modifier? and special_access_modifier?. (@marcandre )
0.5.0 (2020-09-24)
New features
Changes
#121 : Update from Parser::Ruby28 to Parser::Ruby30 for Ruby 3.0 parser (experimental). (@koic )
0.4.2 (2020-09-18)
Bug fixes
0.4.1 (2020-09-16)
Bug fixes
0.4.0 (2020-09-11)
New features
#92 : Add ProcessedSource#tokens_within, ProcessedSource#first_token_of and ProcessedSource#last_token_of. (@fatkodima )
#88 : Add RescueNode. Add ResbodyNode#exceptions and ResbodyNode#branch_index. (@fatkodima )
#89 : Support right hand assignment for Ruby 2.8 (3.0) parser. (@koic )
#93 : Add Node#{left|right_siblings} (@marcandre )
#99 : Add ConstNode and some helper methods. (@marcandre )
Changes
#94 : In Ruby 2.4, Set#=== is harmonized with Ruby 2.5+ to call include?. (@marcandre )
#91 : (Potentially breaking) Node#arguments always returns a frozen array (@marcandre )
0.3.0 (2020-08-01)
New features
Bug fixes
#70 : Fix arguments processing for BreakNode (@marcandre )
#70 : (Potentially breaking) BreakNode and ReturnNode no longer include MethodDispatchNode. These methods were severely broken (@marcandre )
Changes
#44 : (Breaking) Use parser flag self.emit_forward_arg = true by default. (@marcandre )
#86 : PairNode#delimiter and inverse_delimiter now accept their argument as a named argument. (@marcandre )
#87 : (Potentially breaking) Have IfNode#branches return a nil value if source has else; end (@marcandre )
#72 : (Potentially breaking) SuperNode/DefinedNode/YieldNode#arguments now return a frozen array. (@marcandre )
0.2.0 (2020-07-19)
New features
#50 : Support find pattern matching for Ruby 2.8 (3.0) parser. (@koic )
#55 : Add ProcessedSource#line_with_comment?. (@marcandre )
#63 : NodePattern now supports patterns as arguments to predicate and functions. (@marcandre )
#64 : Add Node#global_const?. (@marcandre )
#28 : Add struct_constructor?, class_definition? and module_definition? matchers. (@tejasbubane )
Bug fixes
#55 : Fix ProcessedSource#commented? for multi-line ranges. Renamed contains_comment? (@marcandre )
#69 : (Potentially breaking) RetryNode has many errors. It is now a Node. (@marcandre )
0.1.0 (2020-06-26)
New features
#36 : Add post_condition_loop? and loop_keyword? for Node. (@fatkodima )
#38 : Add helpers allowing to check whether the method is a nonmutating operator method or a nonmutating method of several core classes. (@fatkodima )
#37 : Add enumerable_method? for MethodIdentifierPredicates. (@fatkodima )
#4 : Add interpolation? for RegexpNode. (@tejasbubane )
#20 : Add option predicates for RegexpNode. (@owst )
#11 : Add argument_type? method to make it easy to recognize argument nodes. (@tejasbubane )
#31 : NodePattern now uses param === node to match params, which allows Regexp, Proc, Set in addition to Nodes and literals. (@marcandre )
#41 : Add delimiters and related predicates for RegexpNode. (@owst )
#46 : Basic support for non-legacy AST output from parser . Note that there is no support (yet) in main RuboCop gem. Expect emit_forward_arg to be set to true in v1.0 (@marcandre )
#48 : Support Parser::Ruby28 for Ruby 2.8 (3.0) parser (experimental). (@koic )
#35 : NodePattern now accepts %named_param and %CONST. The macros def_node_matcher and def_node_search accept default named parameters. (@marcandre )
0.0.3 (2020-05-15)
Changes
#7 : Classes NodePattern, ProcessedSource and Token moved to AST::NodePattern, etc.
The rubocop gem has aliases to ensure compatibility. (@marcandre )
#7 : AST::ProcessedSource.from_file now raises a Errno::ENOENT instead of a RuboCop::Error. (@marcandre )
0.0.2 (2020-05-12)
Bug fixes
0.0.1 (2020-05-11)