Use a single return statement defaulting to nil.

bug/bundler_fix
Spencer McIntyre 2014-02-06 14:50:59 -05:00
parent b9fb8decad
commit 27d7df554c
1 changed files with 6 additions and 3 deletions

View File

@ -279,14 +279,17 @@ class SessionManager < Hash
# Returns the session associated with the supplied sid, if any.
#
def get(sid)
session = nil
sid = sid.to_i
if sid > 0
return self[sid]
session = self[sid]
elsif sid == -1
sid = self.keys.sort[-1]
return self[sid]
session = self[sid]
end
return nil
return session
end
#