diff --git a/lib/odb/marshal.rb b/lib/odb/marshal.rb index 976bf77..4213112 100644 --- a/lib/odb/marshal.rb +++ b/lib/odb/marshal.rb @@ -21,6 +21,7 @@ def load str TrueClass, Fixnum, Float, + String, Symbol, Time, Regexp diff --git a/spec/odb/marshal_spec.rb b/spec/odb/marshal_spec.rb index 5485e27..7dcfd28 100644 --- a/spec/odb/marshal_spec.rb +++ b/spec/odb/marshal_spec.rb @@ -135,6 +135,10 @@ def initialize val1 dump_and_load(regex).should == regex end + it "should be able to serialize a string" do + dump_and_load("foobar").should == "foobar" + end + it "should be able to serialize & marshal a time object" do t = Time.now