diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-27 17:16:45 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-27 17:16:45 +0100 |
commit | c94ba8150a726da4a894cd8325ee682a3286ec9f (patch) | |
tree | d9a7c710747e8f9e491ca74edfa17c20a1f9020e /activerecord/lib/active_record | |
parent | 9e2bb2caff2b6fd4712ca3db258b68a588a69e9a (diff) | |
download | rails-c94ba8150a726da4a894cd8325ee682a3286ec9f.tar.gz rails-c94ba8150a726da4a894cd8325ee682a3286ec9f.tar.bz2 rails-c94ba8150a726da4a894cd8325ee682a3286ec9f.zip |
Fixed that serialized strings should never be type-casted (i.e. turning "Yes" to a boolean)(Andreas Korth) [#857 state:committed]
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index b89c8641aa..9c5690d3fd 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2938,7 +2938,7 @@ module ActiveRecord #:nodoc: end def object_from_yaml(string) - return string unless string.is_a?(String) + return string unless string.is_a?(String) && string =~ /^---/ YAML::load(string) rescue string end |