module TypeProf::Utils

Public Class Methods

array_update(ary, idx, elem) click to toggle source
# File typeprof-0.21.8/lib/typeprof/utils.rb, line 3
def self.array_update(ary, idx, elem)
  idx %= ary.size
  ary[0...idx] + [elem] + ary[idx+1..-1]
end