mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -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:
parent
43c34e20d2
commit
00a194d739
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue