summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi/session.rb9
-rw-r--r--lib/finalize.rb6
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index 967603f59cc..6940546ab21 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -51,7 +51,14 @@ class CGI
@dbman = dbman::new(self, option)
request.instance_eval do
@output_hidden = {session_key => id}
- @output_cookies = [Cookie::new(session_key,id)]
+ @output_cookies = [
+ Cookie::new(session_key => id,
+ "path" => if ENV["SCRIPT_NAME"] then
+ File::dirname(ENV["SCRIPT_NAME"])
+ else
+ ""
+ end)
+ ]
end
ObjectSpace::define_finalizer(self, Session::callback(@dbman))
end
diff --git a/lib/finalize.rb b/lib/finalize.rb
index 3cf79ff92f0..598569f52ed 100644
--- a/lib/finalize.rb
+++ b/lib/finalize.rb
@@ -32,7 +32,7 @@
# finalize all dependants connected by dependency R_*(obj, dependtant).
# finalize_by_dependant(dependant, method = :finalize)
# finalize the dependant connected by dependency R_method(*, dependtant).
-# fainalize_all_by_dependant(dependant)
+# finalize_all_by_dependant(dependant)
# finalize all dependants connected by dependency R_*(*, dependant).
# finalize_all
# finalize all dependency registered to the Finalizer.
@@ -138,7 +138,7 @@ module Finalizer
end
# finalize all dependants connected by dependency R_*(*, dependtant)
- def fainalize_all_by_dependant(dependant)
+ def finalize_all_by_dependant(dependant)
for id in @dependency.keys
finalize_all_dependency(id, dependant)
end
@@ -190,7 +190,7 @@ module Finalizer
module_function :finalize_dependency
module_function :finalize_all_dependency
module_function :finalize_by_dependant
- module_function :fainalize_all_by_dependant
+ module_function :finalize_all_by_dependant
module_function :finalize_all
module_function :safe