title: Check if string is a glob pattern
body: <p>On the input I have string that can be plain path string (e.g. <code>/home/user/1.txt</code>) or glob pattern (e.g. <code>/home/user/*.txt</code>).</p>
  
  <p>Next I want to get array of matches if string is glob pattern and in case when string is just plain path I want to get array with single element - this path.</p>
  
  <p>So somehow I should check if string contains unescaped glob symbols and if it does then call <code>Pathname.glob()</code> to get matches otherwise just return array with this string.</p>
  
  <p>How can I check if string is a glob pattern?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I had this question while implementing <a href="https://github.com/Homebrew/brew/pull/2042" rel="nofollow noreferrer">homebrew cask glob pattern support for zap stanza</a>.
  And the solution that I used is to made a little refactoring to avoid need to check if string is a glob pattern.</p>