What is the correct way to detect if ruby is running on Windows? July 28, 2023 by Tarik It turns out, there’s this way: Gem.win_platform?