Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
String is a primitive
  • Loading branch information
smtlaissezfaire committed Nov 2, 2009
1 parent 1ab5b32 commit 9a8c5ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/odb/marshal.rb
Expand Up @@ -21,6 +21,7 @@ def load str
TrueClass,
Fixnum,
Float,
String,
Symbol,
Time,
Regexp
Expand Down
4 changes: 4 additions & 0 deletions spec/odb/marshal_spec.rb
Expand Up @@ -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

Expand Down

0 comments on commit 9a8c5ba

Please sign in to comment.