Check `Array#wrap`:

```ruby
irb(main):001:0> Array.wrap(3)
=> [3]
irb(main):002:0> Array.wrap([3])
=> [3]
irb(main):003:0> Array.wrap(nil)
=> []
```