From 00a194d73915aa86ff3a95302fe0c367c836e2a0 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 15 Oct 2005 02:49:22 +0000 Subject: [PATCH] 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 --- activerecord/lib/active_record/fixtures.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ def read_fixture_files # 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 -- GitLab