123456789_123456789_123456789_123456789_123456789_

Module: TypeProf::Utils

Relationships & Source Files
Namespace Children
Modules:
Classes:
Defined in: lib/typeprof/utils.rb

Class Method Summary

Class Method Details

.array_update(ary, idx, elem)

[ GitHub ]

  
# File '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