From aeae63a56aff1eaf43dc5fc55d7bd0cc9899a9e3 Mon Sep 17 00:00:00 2001 From: timur Date: Tue, 9 Aug 2016 16:29:33 +0300 Subject: [PATCH] Change reverse.each Change on reverse_each because reverse_each loops in reverse order (no intermediate array created). --- script/import_scripts/muut.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/import_scripts/muut.rb b/script/import_scripts/muut.rb index 87239ce7e26..ccd356d90db 100644 --- a/script/import_scripts/muut.rb +++ b/script/import_scripts/muut.rb @@ -122,7 +122,7 @@ class ImportScripts::Muut < ImportScripts::Base # create replies if thread["replies"].present? && thread["replies"].count > 0 - thread["replies"].reverse.each do |post| + thread["replies"].reverse_each do |post| if post_id_from_imported_post_id(post["id"]) next # already imported this post