Skip to content
  • Thomas Bellman's avatar
    61ca2513
    Make resolve_ipnets() work under Ruby 2 again. · 61ca2513
    Thomas Bellman authored
    The ipfamilies parameter to the resolve_ipnets__netspec() helper
    function was intended to be a list of IP address families (including
    the special marker "__ANY").  However, in the case where no explicit
    address family flag was passed to resolve_ipnets(), we passed in a
    ipfamilies parameter of the string "__ANY", instead of a one-item
    list of said string.  This happened to work under Ruby 1.8, where
    strings have an #each method which works as if it was a one-item
    list.  In Ruby 2.0, however, strings don't have a #each method.
    
    Make sure to always pass in a list to resolve_ipnets__netspec().
    
    This was originally commit dcc1f6df8e7f in nsc-puppet-utils.
    61ca2513
    Make resolve_ipnets() work under Ruby 2 again.
    Thomas Bellman authored
    The ipfamilies parameter to the resolve_ipnets__netspec() helper
    function was intended to be a list of IP address families (including
    the special marker "__ANY").  However, in the case where no explicit
    address family flag was passed to resolve_ipnets(), we passed in a
    ipfamilies parameter of the string "__ANY", instead of a one-item
    list of said string.  This happened to work under Ruby 1.8, where
    strings have an #each method which works as if it was a one-item
    list.  In Ruby 2.0, however, strings don't have a #each method.
    
    Make sure to always pass in a list to resolve_ipnets__netspec().
    
    This was originally commit dcc1f6df8e7f in nsc-puppet-utils.
Loading