Merge pull request #8907 from rubys/master

Fix regression introduced in pull 8812