CRuby introduced an optimization to avoid the array construction for calls like the following:
We can easily do the same thing, and perhaps expand it to other forms like [1,2,3][foo] or [1,2,3].each {}.
Relates to #9123 to be used for validating that include? and other methods have not been redefined.
See ruby/ruby#12123
CRuby introduced an optimization to avoid the array construction for calls like the following:
We can easily do the same thing, and perhaps expand it to other forms like
[1,2,3][foo]or[1,2,3].each {}.Relates to #9123 to be used for validating that
include?and other methods have not been redefined.See ruby/ruby#12123