Replace Hash#keys.each with faster Hash#each_key (#29305).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17458 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2018-08-01 14:28:39 +00:00
parent 1e0663de9d
commit ed14823d13
5 changed files with 6 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ module OpenIdAuthentication
@code
end
ERROR_MESSAGES.keys.each { |state| define_method("#{state}?") { @code == state } }
ERROR_MESSAGES.each_key { |state| define_method("#{state}?") { @code == state } }
def successful?
@code == :successful