提交 00a194d7 编写于 作者: J Jeremy Kemper

Really fix #1896. YAML class structure changed between 1.8.2 and 1.8.3,...

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
上级 43c34e20
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册