Kernel#Array only casts - Array#new allows you to pass expected size.

You are probably calling the wrong method by mistake here. `Kernel#Array` doesn't take a `size` keyword argument - that's `Array#new`. You think you're allocating an array with a pre-allocated storage size, but you're just allocating an array `[size]`.