Dir#glob and Dir#[] return an array of matching filenames depending upon the parameter.

#### Before

With Dir#glob and Dir#[], there is a possibility of unintended file operations because they do not check NULL characters.

In the first example above, the NUL-separated glob pattern foo.*\0bar.* unexpectedly matches the files based on the patterns foo.* and bar.*.

The warning that we can notice above, use glob patterns list instead of nul-separated patterns suggests that we use an array of glob patterns instead of a NUL-separated string.

#### Ruby 2.7

Ruby 2.7 prohibits NUL-separated glob pattern.

A check has been added in this update that raises an ArgumentError if the parameter string contains \0.

As we can see, using a NUL-separated string as parameter to Dir#glob or Dir#[] results in an ArgumentError.

Instead, we should use an array of glob patterns as the parameter.

#### Example

Above example makes use of an array of glob patterns.