@@ -368,7 +368,7 @@ def peep(len)
368
368
peek len
369
369
end
370
370
371
- private def scan_check_args ( pattern , headonly )
371
+ private def scan_check_args ( pattern )
372
372
unless Primitive . is_a? ( pattern , Regexp ) || Primitive . is_a? ( pattern , String )
373
373
raise TypeError , "bad pattern argument: #{ pattern . inspect } "
374
374
end
@@ -379,14 +379,14 @@ def peep(len)
379
379
# This method is kept very small so that it should fit within 100
380
380
# AST nodes and can be split. This is done to avoid indirect calls
381
381
# to TRegex.
382
- private def scan_internal ( pattern , advance_pos , getstr , headonly )
383
- scan_check_args ( pattern , headonly )
382
+ private def scan_internal ( pattern , advance_pos , getstr , only_match_at_start )
383
+ scan_check_args ( pattern )
384
384
385
385
if Primitive . is_a? ( pattern , String )
386
- md = scan_internal_string_pattern ( pattern , headonly )
386
+ md = scan_internal_string_pattern ( pattern , only_match_at_start )
387
387
else
388
388
start = @fixed_anchor ? 0 : @pos
389
- md = Truffle ::RegexpOperations . match_in_region pattern , @string , @pos , @string . bytesize , headonly , start
389
+ md = Truffle ::RegexpOperations . match_in_region pattern , @string , @pos , @string . bytesize , only_match_at_start , start
390
390
end
391
391
392
392
if md
@@ -398,10 +398,10 @@ def peep(len)
398
398
end
399
399
Primitive . always_split self , :scan_internal
400
400
401
- private def scan_internal_string_pattern ( pattern , headonly )
401
+ private def scan_internal_string_pattern ( pattern , only_match_at_start )
402
402
pos = @pos
403
403
404
- if headonly
404
+ if only_match_at_start
405
405
if @string . byteslice ( pos ..) . start_with? ( pattern )
406
406
Primitive . matchdata_create_single_group ( pattern , @string . dup , pos , pos + pattern . bytesize )
407
407
else
0 commit comments