Project

General

Profile

Feature #8833 ยป ipaddr_pred.patch

iosctr (Brian Burns), 08/29/2013 08:09 PM

View differences:

lib/ipaddr.rb
331 331
    return self.clone.set(@addr + 1, @family)
332 332
  end
333 333

  
334
  # Returns the predecessor to the ipaddr.
335
  def pred
336
    return self.clone.set(@addr - 1, @family)
337
  end
338

  
334 339
  # Compares the ipaddr with another.
335 340
  def <=>(other)
336 341
    other = coerce_other(other)