What's the best way to handle either a single value or an array in Ruby
===

I want to write a method that accepts either a single value or an array. What's the best idiom for doing this in Ruby?

Here are a couple things I've thought of:

    def do_something(items)
      [*items].each { |item| ... }
    end

I like the conciseness of that one, but it isn't clear unless you're used to this syntax

This next one just feels like too much code.

    def do_something(items)
      items = [items] unless items.respond_to? :each
      items.each { |item| ... }
    end