Skip to content

Commit

Permalink
Merge pull request #598 from glaucocustodio/master
Browse files Browse the repository at this point in the history
Hash#each_key instead of Hash#keys.each. Faster code.
  • Loading branch information
tombruijn committed Nov 2, 2014
2 parents 5c0a40f + 3b8f7ac commit 5f8c4fc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/syncer/cloud/local_file_spec.rb
Expand Up @@ -29,7 +29,7 @@ module Backup
'base_dir.file' => 'a6cfa67bfa0e16402b76d4560c0baa3d' }
}
before do
test_files.keys.each do |path|
test_files.each_key do |path|
File.open(File.join(@tmpdir, path), 'w') {|file| file.write path }
end
end
Expand Down
2 changes: 1 addition & 1 deletion vagrant/utils/tasks/mongodb.rake
Expand Up @@ -53,7 +53,7 @@ module MongoDBTask

def drop_all
puts 'Dropping Databases...'
DATABASES.keys.each do |db_name|
DATABASES.each_key do |db_name|
mongo_client.drop_database db_name.to_s
end
end
Expand Down
2 changes: 1 addition & 1 deletion vagrant/utils/tasks/mysql.rake
Expand Up @@ -40,7 +40,7 @@ module MySQLTask
def drop_all
puts 'Dropping Databases...'
connection = connect_to(nil)
DATABASES.keys.each do |db_name|
DATABASES.each_key do |db_name|
connection.drop_database db_name
end
end
Expand Down
2 changes: 1 addition & 1 deletion vagrant/utils/tasks/postgresql.rake
Expand Up @@ -38,7 +38,7 @@ module PostgreSQLTask
def drop_all
puts 'Dropping Databases...'
connection = connect_to(nil)
DATABASES.keys.each do |db_name|
DATABASES.each_key do |db_name|
connection.drop_database db_name
end
end
Expand Down

0 comments on commit 5f8c4fc

Please sign in to comment.