@@ -31,15 +31,15 @@ def self.search_region(re, str, start_index, end_index, forward)
31
31
from = end_index
32
32
to = start_index
33
33
end
34
- match_in_region ( re , str , from , to , false , true , 0 )
34
+ match_in_region ( re , str , from , to , false , 0 )
35
35
end
36
36
37
37
# This path is used by some string and scanner methods and allows
38
38
# for at_start to be specified on the matcher. FIXME it might be
39
39
# possible to refactor search region to offer the ability to
40
40
# specify at start, we should investigate this at some point.
41
41
def self . match_onwards ( re , str , from , at_start )
42
- md = match_in_region ( re , str , from , str . bytesize , at_start , true , from )
42
+ md = match_in_region ( re , str , from , str . bytesize , at_start , from )
43
43
Primitive . matchdata_fixup_positions ( md , from ) if md
44
44
md
45
45
end
@@ -72,19 +72,19 @@ def self.match_from(re, str, pos)
72
72
end
73
73
end
74
74
75
- def self . match_in_region ( re , str , from , to , at_start , encoding_conversion , start )
75
+ def self . match_in_region ( re , str , from , to , at_start , start )
76
76
if COMPARE_ENGINES
77
- match_in_region_compare_engines ( re , str , from , to , at_start , encoding_conversion , start )
77
+ match_in_region_compare_engines ( re , str , from , to , at_start , start )
78
78
elsif USE_TRUFFLE_REGEX
79
- match_in_region_tregex ( re , str , from , to , at_start , encoding_conversion , start )
79
+ match_in_region_tregex ( re , str , from , to , at_start , start )
80
80
else
81
81
Primitive . regexp_match_in_region ( re , str , from , to , at_start , start )
82
82
end
83
83
end
84
84
85
- def self . match_in_region_compare_engines ( re , str , from , to , at_start , encoding_conversion , start )
85
+ def self . match_in_region_compare_engines ( re , str , from , to , at_start , start )
86
86
begin
87
- md1 = match_in_region_tregex ( re , str , from , to , at_start , encoding_conversion , start )
87
+ md1 = match_in_region_tregex ( re , str , from , to , at_start , start )
88
88
rescue => e
89
89
md1 = e
90
90
end
@@ -96,18 +96,18 @@ def self.match_in_region_compare_engines(re, str, from, to, at_start, encoding_c
96
96
if self . results_match? ( md1 , md2 )
97
97
return self . return_match_data ( md1 )
98
98
else
99
- $stderr. puts "match_in_region(/#{ re } /, \" #{ str } \" @#{ str . encoding } , #{ from } , #{ to } , #{ at_start } , #{ encoding_conversion } , #{ start } ) gate"
99
+ $stderr. puts "match_in_region(/#{ re } /, \" #{ str } \" @#{ str . encoding } , #{ from } , #{ to } , #{ at_start } , #{ start } ) gate"
100
100
self . print_match_data ( md1 )
101
101
$stderr. puts 'but we expected'
102
102
self . print_match_data ( md2 )
103
103
return self . return_match_data ( md2 )
104
104
end
105
105
end
106
106
107
- def self . match_in_region_tregex ( re , str , from , to , at_start , encoding_conversion , start )
107
+ def self . match_in_region_tregex ( re , str , from , to , at_start , start )
108
108
bail_out = to < from || to != str . bytesize || start != 0 || from < 0
109
109
if !bail_out
110
- compiled_regex = tregex_compile ( re , at_start , select_encoding ( re , str , encoding_conversion ) )
110
+ compiled_regex = tregex_compile ( re , at_start , select_encoding ( re , str ) )
111
111
bail_out = compiled_regex . nil?
112
112
end
113
113
if !bail_out
0 commit comments