diff options
Diffstat (limited to 'jni/ruby/sample/cgi-session-pstore.rb')
-rw-r--r-- | jni/ruby/sample/cgi-session-pstore.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jni/ruby/sample/cgi-session-pstore.rb b/jni/ruby/sample/cgi-session-pstore.rb new file mode 100644 index 0000000..ec8b498 --- /dev/null +++ b/jni/ruby/sample/cgi-session-pstore.rb @@ -0,0 +1,11 @@ +require 'cgi' +require 'cgi/session/pstore' + +STDIN.reopen(IO::NULL) +cgi = CGI.new +session = CGI::Session.new(cgi, 'database_manager' => CGI::Session::PStore) +session['key'] = {'k' => 'v'} +puts session['key'].class +fail unless Hash === session['key'] +puts session['key'].inspect +fail unless session['key'].inspect == '{"k"=>"v"}' |