Also you can rewrite this method as:

```ruby
def self.sanitize_array(aa)
  aa.reduce([]) do |rv, v|
    rv << case v.class
        when Hash  then sanitize_hash(v)
        when Array  then sanitize_array(v)
        else v
      end
    end
end
```