Permalink
Browse files

use new skool Ruby instead of Ruby Classic™

  • Loading branch information...
1 parent 7752b2f commit b7934afe326f8bba9cdcacdfac93062dff155efe @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.

1 comment on commit b7934af

Member

mikel commented on b7934af Sep 28, 2010

You young whipper-snappers think you know all the new tricks...

Please sign in to comment.