Add with_object to ruby 1.8 so tests pass