]> source.dussan.org Git - redmine.git/commitdiff
Use reverse_each instead of reverse.each (#27671).
authorGo MAEDA <maeda@farend.jp>
Sun, 31 Dec 2017 01:34:39 +0000 (01:34 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 31 Dec 2017 01:34:39 +0000 (01:34 +0000)
Patch by Timur Tarasenko.

git-svn-id: http://svn.redmine.org/redmine/trunk@17137 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/activities/index.html.erb
app/views/my/blocks/_timelog.html.erb
app/views/users/show.html.erb
app/views/wiki/date_index.html.erb
lib/diff.rb
lib/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb

index c3026fb63e0283c91323b76b81f20a78b964b2fb..196984d640d15761229534afbd9ab063b8aa79df 100644 (file)
@@ -2,7 +2,7 @@
 <p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p>
 
 <div id="activity">
-<% @events_by_day.keys.sort.reverse.each do |day| %>
+<% @events_by_day.keys.sort.reverse_each do |day| %>
 <h3><%= format_activity_day(day) %></h3>
 <dl>
 <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
index 350cbaec86e408a0615626583624945ab8e38243..f96ee6c2e20f0e8f2dd3a1e39c3be760df93dc1e 100644 (file)
@@ -37,7 +37,7 @@
 <th><%= l(:field_hours) %></th>
 </tr></thead>
 <tbody>
-<% entries_by_day.keys.sort.reverse.each do |day| %>
+<% entries_by_day.keys.sort.reverse_each do |day| %>
   <tr class="odd">
     <td><strong><%= day == User.current.today ? l(:label_today).titleize : format_date(day) %></strong></td>
     <td colspan="2"></td>
index 943ee3821319015c78b77942c568b9eb4b150204..3907d6192a5543ba98056a838a8e8815ee32ae7e 100644 (file)
@@ -53,7 +53,7 @@
                 :from => @events_by_day.keys.first %></h3>
 
 <div id="activity">
-<% @events_by_day.keys.sort.reverse.each do |day| %>
+<% @events_by_day.keys.sort.reverse_each do |day| %>
 <h4><%= format_activity_day(day) %></h4>
 <dl>
 <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
index 69a6960b4bba9092be29f18c584ddfeb440960b7..274f19a8a2b3e810116ac199409822bd84175935 100644 (file)
@@ -14,7 +14,7 @@
 <p class="nodata"><%= l(:label_no_data) %></p>
 <% end %>
 
-<% @pages_by_date.keys.sort.reverse.each do |date| %>
+<% @pages_by_date.keys.sort.reverse_each do |date| %>
 <h3><%= format_date(date) %></h3>
 <ul>
 <% @pages_by_date[date].each do |page| %>
index 9e1653f14043713c17902055f86d6f109fc49a5c..90adc7e3391d8567adae5a0ba2ad295b25be1546 100644 (file)
@@ -32,7 +32,7 @@ module RedmineDiff
         aelem = a[aindex]
         next unless bmatches.has_key? aelem
         k = nil
-        bmatches[aelem].reverse.each { |bindex|
+        bmatches[aelem].reverse_each { |bindex|
           if k && (thresh[k] > bindex) && (thresh[k-1] < bindex)
             thresh[k] = bindex
           else
index 780fb6ad258335c502d67862a9d6b4e06f9ad17f..f696d4dcc9f72c853d08ffefc167765f912d5799 100644 (file)
@@ -29,7 +29,7 @@ module OpenIdAuthentication
           Association.find_all_by_server_url_and_handle(server_url, handle)
         end
 
-      assocs.reverse.each do |assoc|
+      assocs.reverse_each do |assoc|
         a = assoc.from_record
         if a.expires_in == 0
           assoc.destroy