[] .include? (: test) return noil

We have a strange problem that [].include?(:test)returns nilinstead of what was expected false. All this happens only when the application starts (I see it in rubimine debugging mode), and not in the irb or rails console.

I tested the following:

[].include?(:test)  # nil

[].include?(:test).nil? # nil

[].class # Array

Seems to turn on? corresponded somewhere, but I could not figure out where. grep -R Array * and grep -R include? *Nothing strange. Any idea how I can find out more?

+3
source share

Source: https://habr.com/ru/post/1738999/


All Articles