diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-15 02:49:22 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-15 02:49:22 +0000 |
commit | 00a194d73915aa86ff3a95302fe0c367c836e2a0 (patch) | |
tree | 677fb9643afcf072b0d127abcf5f26f5cae4bf16 /activerecord/lib/active_record | |
parent | 43c34e20d2698e04c398496e4cbc4e2271619297 (diff) | |
download | rails-00a194d73915aa86ff3a95302fe0c367c836e2a0.tar.gz rails-00a194d73915aa86ff3a95302fe0c367c836e2a0.tar.bz2 rails-00a194d73915aa86ff3a95302fe0c367c836e2a0.zip |
Really fix #1896. YAML class structure changed between 1.8.2 and 1.8.3, breaking the original implementation. Duck-type instead of checking kind_of?
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index e0b713fb83..6ee963951e 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -308,7 +308,7 @@ class Fixtures < YAML::Omap # YAML fixtures begin if yaml = YAML::load(erb_render(IO.read(yaml_file_path))) - yaml = yaml.value if yaml.kind_of?(YAML::Syck::PrivateType) + yaml = yaml.value if yaml.respond_to?(:type_id) and yaml.respond_to?(:value) yaml.each do |name, data| self[name] = Fixture.new(data, @class_name) end |