diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-30 19:45:30 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-30 19:45:30 +0000 |
commit | d074ef4d60e389348d10dd1d81e76634c17acb2d (patch) | |
tree | f11e712b6564846cfda612cba73797920a59e224 /ext/psych | |
parent | 16ceba03968244e64e015965c2f3ec6a8f1836fb (diff) | |
download | ruby-d074ef4d60e389348d10dd1d81e76634c17acb2d.tar.gz |
* string.c (tr_setup_table): fix bug in r29146.
Initialize table even if cflag is 0; tr_find see whether
del is empty or not.
* string.c (tr_find): nodel can't be NULL; if NULL, it means
it is not specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb index 520cd7e9c2..6df1151ad7 100644 --- a/ext/psych/lib/psych/visitors/yaml_tree.rb +++ b/ext/psych/lib/psych/visitors/yaml_tree.rb @@ -205,7 +205,7 @@ module Psych quote = false style = Nodes::Scalar::ANY - if o.index("\x00") || o.count("^ -~\t\r\n").fdiv(o.length) > 0.3 + if o.index("\x00") || o.count("\x00-\x7F", "^ -~\t\r\n").fdiv(o.length) > 0.3 str = [o].pack('m').chomp tag = '!binary' # FIXME: change to below when syck is removed #tag = 'tag:yaml.org,2002:binary' |