diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-27 18:55:28 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-27 18:55:28 -0700 |
commit | b7934afe326f8bba9cdcacdfac93062dff155efe (patch) | |
tree | 902696a274bf9e416e57034ccd300fbe2781337d /activerecord/lib | |
parent | 7752b2fa629d55e870342b1bafa57d6805007497 (diff) | |
download | rails-b7934afe326f8bba9cdcacdfac93062dff155efe.tar.gz rails-b7934afe326f8bba9cdcacdfac93062dff155efe.tar.bz2 rails-b7934afe326f8bba9cdcacdfac93062dff155efe.zip |
use new skool Ruby instead of Ruby Classicâ„¢
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 826031a3e3..6fb723f2f5 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -704,11 +704,9 @@ class Fixtures < (RUBY_VERSION < '1.9' ? YAML::Omap : Hash) 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. |