diff options
author | Alexandr Opak <opak.alexandr@gmail.com> | 2021-01-29 14:10:04 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-08-31 19:34:28 +0900 |
commit | 44353d0dee76a547629a6ab978fdaead9b5f79fb (patch) | |
tree | 9c3b4ea90002167b762446f7fc0845a33f38d2db /ext | |
parent | beffa72c27c77603ecc15c60518a55bea4aad3de (diff) | |
download | ruby-44353d0dee76a547629a6ab978fdaead9b5f79fb.tar.gz |
[ruby/psych] add more tests
https://github.com/ruby/psych/commit/8f71222bf3
Diffstat (limited to 'ext')
-rw-r--r-- | ext/psych/lib/psych/scalar_scanner.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb index eecd46ebe8..383a8acc1b 100644 --- a/ext/psych/lib/psych/scalar_scanner.rb +++ b/ext/psych/lib/psych/scalar_scanner.rb @@ -13,10 +13,10 @@ module Psych FLOAT = /^(?:[-+]?([0-9][0-9_,]*)?\.[0-9]*([eE][-+][0-9]+)?(?# base 10))$/x # Taken from http://yaml.org/type/int.html - INTEGER = /^(?:[-+]?0b[0-1_,]+ (?# base 2) - |[-+]?0[0-7_,]+ (?# base 8) - |[-+]?(?:\d|[1-9][0-9_,]*[^_]) (?# base 10) - |[-+]?0x[0-9a-fA-F_,]+ (?# base 16))$/x + INTEGER = /^(?:[-+]?0b[0-1_,]+ (?# base 2) + |[-+]?0[0-7_,]+ (?# base 8) + |[-+]?(?:0|[1-9]([0-9]|,[0-9]|_[0-9])*) (?# base 10) + |[-+]?0x[0-9a-fA-F_,]+ (?# base 16))$/x attr_reader :class_loader |