checked some unchecked files, add patern_matching spec raises Type Error when pattern is not a string or regexp