Permalink
Browse files

use new skool Ruby instead of Ruby Classic™

  • Loading branch information...
1 parent 721f434 commit 6059c9679e47bbde58bab7dae9ea67f5559fbd4d @tenderlove tenderlove committed Sep 28, 2010
Showing with 3 additions and 5 deletions.
  1. +3 −5 activerecord/lib/active_record/fixtures.rb
@@ -704,11 +704,9 @@ def read_fixture_files
end
def read_yaml_fixture_files
- yaml_string = ""
- Dir["#{@fixture_path}/**/*.yml"].select { |f| test(?f, f) }.each do |subfixture_path|
- yaml_string << IO.read(subfixture_path)
- end
- yaml_string << IO.read(yaml_file_path)
+ yaml_string = (Dir["#{@fixture_path}/**/*.yml"].select { |f|
+ File.file?(f)
+ } + [yaml_file_path]).map { |file_path| IO.read(file_path) }.join
if yaml = parse_yaml_string(yaml_string)
# If the file is an ordered map, extract its children.

0 comments on commit 6059c96

Please sign in to comment.