From d8d2fe124a997668edcfe24bc312d77138939d86 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 16 Nov 2007 02:16:43 +0000 Subject: * lib/yaml/rubytypes.rb (String#is_binary_data?): use Integer#fdiv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/yaml/rubytypes.rb | 2 +- version.h | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 134a485881..fc84570421 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Nov 16 11:16:41 2007 Nobuyoshi Nakada + + * lib/yaml/rubytypes.rb (String#is_binary_data?): use Integer#fdiv. + Thu Nov 15 19:50:46 2007 NAKAMURA Usaku * ext/curses/extconf.rb: check macro if cannot find func. diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb index eebf027135..c71b704b43 100644 --- a/lib/yaml/rubytypes.rb +++ b/lib/yaml/rubytypes.rb @@ -143,7 +143,7 @@ class String to_yaml_style or not to_yaml_properties.empty? or self =~ /\n.+/ end def is_binary_data? - ( self.count( "^ -~", "^\r\n" ) / self.size > 0.3 || self.count( "\x00" ) > 0 ) unless empty? + ( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty? end def String.yaml_new( klass, tag, val ) val = val.unpack("m")[0] if tag == "tag:yaml.org,2002:binary" diff --git a/version.h b/version.h index 354bb06cb6..c002640d7c 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2007-11-15" +#define RUBY_RELEASE_DATE "2007-11-16" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20071115 +#define RUBY_RELEASE_CODE 20071116 #define RUBY_PATCHLEVEL 5000 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 11 -#define RUBY_RELEASE_DAY 15 +#define RUBY_RELEASE_DAY 16 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; -- cgit v1.2.3