I propose:

```ruby
[k, Array(v).join("\n")]
```

`Array(x)` will return:
`x` if x is an array.
`[x]` if x is not an array