Navigation Menu

Skip to content

Commit

Permalink
Use key?
Browse files Browse the repository at this point in the history
`keys.include?` isn't straightforward and creates a needless temporary
array.
  • Loading branch information
kou committed Jun 28, 2014
1 parent 562fbbe commit e30586f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/droonga/serf.rb
Expand Up @@ -170,7 +170,7 @@ def status
def role
if status[:role]
role = status[:role].to_sym
if self.class::ROLE.keys.include?(role)
if self.class::ROLE.key?(role)
return role
end
end
Expand Down

0 comments on commit e30586f

Please sign in to comment.