Support for the Ruby 2.1 series ended on March 31 2017. See here for details.

In Files

  • dl/lib/dl/pack.rb
  • dl/lib/dl/struct.rb

Methods

DL::PackInfo

Public Class Methods

align(addr, align) click to toggle source
 
               # File dl/lib/dl/pack.rb, line 52
def align(addr, align)
  d = addr % align
  if( d == 0 )
    addr
  else
    addr + (align - d)
  end
end