Flowdock
method

succ

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: Prime

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

These similar methods exist in v1_9_3_392:

succ() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/mathn.rb, line 78
  def succ
    i = -1
    size = @primes.size
    while i < size
      if i == -1
        @seed += 1
        i += 1
      else
        while @seed > @counts[i]
          @counts[i] += @primes[i]
        end
        if @seed != @counts[i]
          i += 1
        else
          i = -1
        end
      end
    end
    @primes.push @seed
    @counts.push @seed + @seed
    return @seed
  end
Register or log in to add new notes.