lib/nephos-server/cookies.rb in nephos-server-0.7.0 vs lib/nephos-server/cookies.rb in nephos-server-0.7.1
- old
+ new
@@ -21,10 +21,11 @@
@hash.send(m, *(a.map(&:to_s)))
@hash.send(m, *a)
end
def [] i
- @hash[i.to_s][:content]
+ c = @hash[i.to_s]
+ c && c[:content]
end
def []= i, v, path="/"
@hash[i.to_s] = {content: v.to_s, path: path.to_s}
end