Commit a45f7262f9a3e26361b6fde4f77d0d27437535cf

Authored by C. Morgan Hamill
1 parent 9e805b77

Clean up of `name` fallback code.

Don't use `unless` for the conditional.
Avoid double-quotes where possible.
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
lib/gitlab/oauth/user.rb
... ... @@ -65,10 +65,10 @@ module Gitlab
65 65 end
66 66  
67 67 def name
68   - unless auth.info.name.nil?
69   - auth.info.name.to_s.force_encoding("utf-8")
  68 + if !auth.info.name.nil?
  69 + auth.info.name.to_s.force_encoding('utf-8')
70 70 else
71   - "#{auth.info.first_name} #{auth.info.last_name}".force_encoding("utf-8")
  71 + "#{auth.info.first_name} #{auth.info.last_name}".force_encoding('utf-8')
72 72 end
73 73 end
74 74  
... ...