ruby-changes:59877
From: Nobuyoshi <ko1@a...>
Date: Thu, 30 Jan 2020 11:35:13 +0900 (JST)
Subject: [ruby-changes:59877] f7f8dc5fd4 (master): Unnamed groups are not captured when named groups are used
https://git.ruby-lang.org/ruby.git/commit/?id=f7f8dc5fd4 From f7f8dc5fd47bcd79e8e46cd321ad0dec9e0ec5cd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 30 Jan 2020 11:31:48 +0900 Subject: Unnamed groups are not captured when named groups are used diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb index 5f89446..ed83748 100644 --- a/tool/transform_mjit_header.rb +++ b/tool/transform_mjit_header.rb @@ -105,7 +105,7 @@ module MJITHeader https://github.com/ruby/ruby/blob/trunk/tool/transform_mjit_header.rb#L105 su2_regex = /{([^{}]|#{su1_regex})*}/ su3_regex = /{([^{}]|#{su2_regex})*}/ # 3 nested structs/unions is probably enough reduced_decl.gsub!(su3_regex, '') # remove structs/unions in the header - id_seq_regex = /\s*(#{ident_regex}(\s+|\s*[*]+\s*))*/ + id_seq_regex = /\s*(?:#{ident_regex}(?:\s+|\s*[*]+\s*))*/ # Process function header: match = /\A#{id_seq_regex}(?<name>#{ident_regex})\s*\(/.match(reduced_decl) return match[:name] if match -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/