Module: V8::Access::Invocation::Aritize

Included in:
Method, Proc
Defined in:
lib/v8/access/invocation.rb

Instance Method Summary collapse

Instance Method Details

#aritize(args) ⇒ Object



8
9
10
# File 'lib/v8/access/invocation.rb', line 8

def aritize(args)
  arity < 0 ? args : Array.new(arity).to_enum(:each_with_index).map {|item, i| args[i]}
end