diff options
author | Mark Thorn <mcthorn@gmail.com> | 2020-03-03 10:03:28 -0800 |
---|---|---|
committer | Mark Thorn <mcthorn@gmail.com> | 2020-03-03 10:03:28 -0800 |
commit | ac2d2c9b1bb42f3cad9f176b4072c2db58978d6d (patch) | |
tree | 2bc2f0a50b70e1c76a0aa6ba16aeb408fd67c948 /lib | |
parent | bb8a35ef7e45654ce3e57c9154da014432a46d13 (diff) | |
download | psych-ac2d2c9b1bb42f3cad9f176b4072c2db58978d6d.zip |
Fix ArgumentError with leading and trailing underscores in number strings.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych/scalar_scanner.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/psych/scalar_scanner.rb b/lib/psych/scalar_scanner.rb index cea2a45..d565a33 100644 --- a/lib/psych/scalar_scanner.rb +++ b/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 ### |