Permalink
Browse files

Don't rely on exceptions for control flow

  • Loading branch information...
1 parent 0f6ee06 commit b94b3210a8e3752a05c2f13565ff5e3d3aa6a9b9 @brainopia brainopia committed Jan 27, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/rack/session/cookie.rb
@@ -61,6 +61,7 @@ def encode(str)
end
def decode(str)
+ return unless str
::Marshal.load(super(str)) rescue nil
end
end

0 comments on commit b94b321

Please sign in to comment.