summaryrefslogtreecommitdiff
path: root/lib/rack
diff options
context:
space:
mode:
authorbrainopia <brainopia@evilmartians.com>2012-02-04 01:44:04 +0400
committerbrainopia <brainopia@evilmartians.com>2012-02-04 12:07:16 +0400
commitfbd45241ab5db57e6030e2cba19756429035a4b0 (patch)
treece8939b8f5cad7e6518a50ed78a1a8077b666fa5 /lib/rack
parent6831e118ea6949e9d88e457ab6c4ab654de4cb7d (diff)
downloadrack-fbd45241ab5db57e6030e2cba19756429035a4b0.tar.gz
Implement Rack::Session::Abstract::SessionHash#destroy
Diffstat (limited to 'lib/rack')
-rw-r--r--lib/rack/session/abstract/id.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rack/session/abstract/id.rb b/lib/rack/session/abstract/id.rb
index 2baad05a..a5dd1aed 100644
--- a/lib/rack/session/abstract/id.rb
+++ b/lib/rack/session/abstract/id.rb
@@ -77,6 +77,12 @@ module Rack
super
end
+ def destroy
+ clear
+ options = @env[ENV_SESSION_OPTIONS_KEY]
+ options[:id] = @by.send(:destroy_session, @env, options[:id], options)
+ end
+
def to_hash
load_for_read!
Hash[self].delete_if { |k,v| v.nil? }