public
Description: Run multiple framework / rack app / wathever inside the same VM
Clone URL: git://github.com/macournoyer/rack_sandbox.git
macournoyer (author)
Fri Mar 21 12:51:03 -0700 2008
commit  95167f5720d92c1d2a3a02b9ba5963ac8aaa1cac
tree    7e2e5fa2883cb0730518ab567960c3e1df89d4aa
rack_sandbox / lib / sandbox / marshal.rb
100644 16 lines (13 sloc) 0.376 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Sandbox marshals object before sending them back in the Jungle.
# Since we return the response we need to marshal some objects
# that do not support marshaling out of the box.
# This is loaded inside the Sandbox and in the Jungle (outside).
 
require 'stringio'
class StringIO
  def marshal_dump
    @string
  end
  
  def marshal_load(string)
    @string = string
  end
end