summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2020-06-03 15:28:23 -0700
committerGitHub <noreply@github.com>2020-06-03 15:28:23 -0700
commit9f8c3655376aecec6056adb2bb12665971980f9f (patch)
tree61c5c4f9f8aff79f31da88d93a20bc76eda8f2e5 /lib
parenta8317a1c26f2efa7d2b44abc7ebe050f8f0ef341 (diff)
parentac2d2c9b1bb42f3cad9f176b4072c2db58978d6d (diff)
downloadpsych-9f8c3655376aecec6056adb2bb12665971980f9f.zip
Merge pull request #438 from mthorn/master
Fix ArgumentError with leading and trailing underscores in number str…
Diffstat (limited to 'lib')
-rw-r--r--lib/psych/scalar_scanner.rb2
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
###