@@ -99,10 +99,12 @@ def charpos
99
99
def check ( pattern )
100
100
scan_internal pattern , false , true , true
101
101
end
102
+ Primitive . always_split self , :check
102
103
103
104
def check_until ( pattern )
104
105
scan_internal pattern , false , true , false
105
106
end
107
+ Primitive . always_split self , :check_until
106
108
107
109
def clear
108
110
warn 'StringScanner#clear is obsolete; use #terminate instead' if $VERBOSE
@@ -128,6 +130,7 @@ def eos?
128
130
def exist? ( pattern )
129
131
scan_internal pattern , false , false , false
130
132
end
133
+ Primitive . always_split self , :exist?
131
134
132
135
def fixed_anchor?
133
136
@fixed_anchor
@@ -192,6 +195,7 @@ def inspect
192
195
def match? ( pattern )
193
196
scan_internal pattern , false , false , true
194
197
end
198
+ Primitive . always_split self , :match?
195
199
196
200
def matched
197
201
@match &.to_s
@@ -247,6 +251,7 @@ def restsize
247
251
def scan ( pattern )
248
252
scan_internal pattern , true , true , true
249
253
end
254
+ Primitive . always_split self , :scan
250
255
251
256
def scan_byte
252
257
if eos?
@@ -284,14 +289,17 @@ def scan_integer(base: 10)
284
289
def scan_until ( pattern )
285
290
scan_internal pattern , true , true , false
286
291
end
292
+ Primitive . always_split self , :scan_until
287
293
288
294
def scan_full ( pattern , advance_pos , getstr )
289
295
scan_internal pattern , advance_pos , getstr , true
290
296
end
297
+ Primitive . always_split self , :scan_full
291
298
292
299
def search_full ( pattern , advance_pos , getstr )
293
300
scan_internal pattern , advance_pos , getstr , false
294
301
end
302
+ Primitive . always_split self , :search_full
295
303
296
304
def self . must_C_version
297
305
self
@@ -304,10 +312,12 @@ def size
304
312
def skip ( pattern )
305
313
scan_internal pattern , true , false , true
306
314
end
315
+ Primitive . always_split self , :skip
307
316
308
317
def skip_until ( pattern )
309
318
scan_internal pattern , true , false , false
310
319
end
320
+ Primitive . always_split self , :skip_until
311
321
312
322
def string
313
323
@original
@@ -387,6 +397,7 @@ def peep(len)
387
397
@match = nil
388
398
end
389
399
end
400
+ Primitive . always_split self , :scan_internal
390
401
391
402
private def scan_internal_string_pattern ( pattern , headonly )
392
403
pos = @pos
0 commit comments