diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cgi/session.rb | 37 | ||||
-rw-r--r-- | lib/mkmf.rb | 4 |
2 files changed, 39 insertions, 2 deletions
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb index 9a49fdedc..6ca85e180 100644 --- a/lib/cgi/session.rb +++ b/lib/cgi/session.rb @@ -458,5 +458,42 @@ class CGI GLOBAL_HASH_TABLE.delete(@session_id) end end + + # Dummy session storage class. + # + # Implements session storage place holder. No actual storage + # will be done. + class NullStore + # Create a new NullStore instance. + # + # +session+ is the session this instance is associated with. + # +option+ is a list of initialisation options. None are + # currently recognised. + def initialize(session, option=nil) + end + + # Restore (empty) session state. + def restore + {} + end + + # Update session state. + # + # A no-op. + def update + end + + # Close session storage. + # + # A no-op. + def close + end + + # Delete the session state. + # + # A no-op. + def delete + end + end end end diff --git a/lib/mkmf.rb b/lib/mkmf.rb index e869fc9ca..98c56ed24 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -475,7 +475,7 @@ def checking_for(m) r end -def have_library(lib, func = nil, &b) +def have_library(lib, func = nil, header=nil, &b) func = "main" if !func or func.empty? lib = with_config(lib+'lib', lib) checking_for "#{func}() in #{LIBARG%lib}" do @@ -483,7 +483,7 @@ def have_library(lib, func = nil, &b) true else libs = append_library($libs, lib) - if try_func(func, libs, &b) + if try_func(func, libs, header, &b) $libs = libs true else |