title: Handle empty array as nil in Ruby
body: <p>An empty array (<code>[]</code>) is handled as "true" in boolean contexts. Is there any smart way to handle an empty array as false?</p>
  
  <p>I would like to make a simple code that lists C files in the current directory, or "Main.c" if no C file is in the directory. I can write like below, but is there any smarter way?</p>
  
  <pre><code>Dir.glob("*.c")!=[] ? Dir.glob("*.c").join(" ") : "Main.c"
  </code></pre>