Skip to content

Commit a729790

Browse files
committed
Simplify
1 parent f6abe62 commit a729790

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/truffle/strscan.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def scan_integer(base: 10)
277277
end
278278

279279
if substr
280-
Primitive.string_to_inum(substr, base, true, true)
280+
substr.to_i(base)
281281
end
282282
end
283283

@@ -332,7 +332,7 @@ def terminate
332332
end
333333

334334
def unscan
335-
raise ScanError if Primitive.nil?(@match)
335+
raise ScanError unless @match
336336
@pos = @prev_pos
337337
@prev_pos = nil
338338
@match = nil

0 commit comments

Comments
 (0)