Sha256: bd21f3add087c268461324601b60eef6e8781a3c723d550406f372fba670d083

Contents?: true

Size: 324 Bytes

Versions: 3

Compression:

Stored size: 324 Bytes

Contents

# Core class extensions
# Copyright (c) M.J.N. Corino, The Netherlands

class ::Array

  def resize(sz, obj=nil, &block)
    if sz > self.size
      if block
        self.fill(sz-1, 0, &block)
      else
        self.fill(obj, sz-1, 0)
      end
    elsif sz < self.size
      self.slice!(0, sz)
    end
    self
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wxruby3-shapes-0.9.6 lib/wx/shapes/core.rb
wxruby3-shapes-0.9.5 lib/wx/shapes/core.rb
wxruby3-shapes-0.9.0.pre.beta.3 lib/wx/shapes/core.rb