summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2017-12-31 01:34:39 +0000
committerGo MAEDA <maeda@farend.jp>2017-12-31 01:34:39 +0000
commit14e0a6bdba5a6b49741cc131021fcf5c0b873c98 (patch)
tree4d2b8a07c86e1d7006e2d07ee43cf46b561d0096 /lib
parentd2298e419c108dd3351cff688ff198a09f06eec8 (diff)
downloadredmine-14e0a6bdba5a6b49741cc131021fcf5c0b873c98.tar.gz
redmine-14e0a6bdba5a6b49741cc131021fcf5c0b873c98.zip
Use reverse_each instead of reverse.each (#27671).
Patch by Timur Tarasenko. git-svn-id: http://svn.redmine.org/redmine/trunk@17137 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/diff.rb2
-rw-r--r--lib/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/diff.rb b/lib/diff.rb
index 9e1653f14..90adc7e33 100644
--- a/lib/diff.rb
+++ b/lib/diff.rb
@@ -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
diff --git a/lib/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb b/lib/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb
index 780fb6ad2..f696d4dcc 100644
--- a/lib/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb
+++ b/lib/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb
@@ -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