mirror of
https://github.com/github/rails.git
synced 2026-01-26 14:58:11 -05:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user