RubyClient: handle object/unit primitives exceptionally in to_hash
Updates tests