aboutsummaryrefslogtreecommitdiffstats
path: root/ext/syck/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/syck/lib')
-rw-r--r--ext/syck/lib/syck/rubytypes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/syck/lib/syck/rubytypes.rb b/ext/syck/lib/syck/rubytypes.rb
index 50a6f4622b..f8bbfea022 100644
--- a/ext/syck/lib/syck/rubytypes.rb
+++ b/ext/syck/lib/syck/rubytypes.rb
@@ -148,7 +148,7 @@ class String
to_yaml_style or not to_yaml_properties.empty? or self =~ /\n.+/
end
def is_binary_data?
- self.count("^ -~\t\r\n").fdiv(self.size) > 0.3 || self.index("\x00") unless self.empty?
+ self.count("\x00-\x7F", "^ -~\t\r\n").fdiv(self.size) > 0.3 || self.index("\x00") unless self.empty?
end
def String.yaml_new( klass, tag, val )
val = val.unpack("m")[0] if tag == "tag:yaml.org,2002:binary"