diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-22 21:06:25 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-22 21:06:25 +0000 |
commit | c05952c6a1687cac0526b0324b3659032aa7664a (patch) | |
tree | fc39be4fb56718022de4723b00fad13f2d649ad2 /ext | |
parent | 1c5ae4b31d364dd9af8c7e4b1499c48f08e55cf2 (diff) | |
download | ruby-c05952c6a1687cac0526b0324b3659032aa7664a.tar.gz |
* ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner to
understand strings starting with an underscore and containing only
digits. Thanks Kelley Reynolds.
* test/psych/test_scalar_scanner.rb: test for fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/psych/lib/psych/scalar_scanner.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb index fa2d385a63..8727adecb4 100644 --- a/ext/psych/lib/psych/scalar_scanner.rb +++ b/ext/psych/lib/psych/scalar_scanner.rb @@ -24,7 +24,7 @@ module Psych return string if @string_cache.key?(string) case string - when /^[A-Za-z~]/ + when /^[A-Za-z_~]/ if string.length > 5 @string_cache[string] = true return string |