From f2459763862fa2eef6929557a87763fe5ff5c470 Mon Sep 17 00:00:00 2001 From: Mark Thorn Date: Tue, 3 Mar 2020 10:03:28 -0800 Subject: [ruby/psych] Fix ArgumentError with leading and trailing underscores in number strings. https://github.com/ruby/psych/commit/ac2d2c9b1b --- ext/psych/lib/psych/scalar_scanner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/psych/lib/psych') diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb index cea2a453dd..d565a336e8 100644 --- a/ext/psych/lib/psych/scalar_scanner.rb +++ b/ext/psych/lib/psych/scalar_scanner.rb @@ -101,7 +101,7 @@ module Psych ### # Parse and return an int from +string+ def parse_int string - Integer(string.gsub(/[,]/, '')) + Integer(string.gsub(/[,_]/, '')) end ### -- cgit v1.2.3