summaryrefslogtreecommitdiff
path: root/tool/transform_mjit_header.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-30 11:31:48 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-30 11:31:48 +0900
commitf7f8dc5fd47bcd79e8e46cd321ad0dec9e0ec5cd (patch)
treef55b2038092ec8669268d4ea3a004cd524e7ea5d /tool/transform_mjit_header.rb
parent5d124a3b68982e779946804b5b9578c403c6bdf2 (diff)
Unnamed groups are not captured when named groups are used
Diffstat (limited to 'tool/transform_mjit_header.rb')
-rw-r--r--tool/transform_mjit_header.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb
index 5f89446c81..ed837486a7 100644
--- a/tool/transform_mjit_header.rb
+++ b/tool/transform_mjit_header.rb
@@ -105,7 +105,7 @@ module MJITHeader
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