Python? Preinstalled. Git? Got you covered. Ruby? Sits right there. Java? Check. Ant, Maven? You bet!
There is no other OS offering the same level of convenience to developers, no matter what stack they used.
I believe that is a consequence of macOS being built with BSD foundations. They're there. But let's not pretend macOS *nix/POSIX stuff is great; there's a reason that MacPorts exists.
I'd argue that Ubuntu does offer greater. Let's not pretend Xcode is a good IDE, either. I can't even recall the number of times I had my project crash on me.
And no, e.g. Ubuntu doesn't include Ruby or Git in default installation, nor FreeBSD.
Convenience to development should be measured by how easy it is to install/access development tools when you need them -- such as how well the package manager work, not how much stuff the base system come with.
Actually, I believe you can install Ruby/Git on Ubuntu install if you toggle Development tools. But anyone doing serious Ruby development will use rvm/docker.
Even when Ruby was included in Lion, nobody developing Ruby apps could use the vendor-supplied stuff. I remember this from back in 2008. There were countless blog articles telling you to download Ruby and compile. The situation from a decade ago caused a ton of pain in bootstrapping a developer setup.
Microsoft is a famously developer-friendly company (sorry, "developers, developers, developers," comes to mind). However during Ballmer-era years, user experience was jumpy, and developers had free reign to build their products even if it was disconnected from the OS look and feel. The transition to Windows UAC, for example, was a result of Microsoft being too lax on developers for many years before (writing to anywhere on C drive), until Microsoft said they couldn't just write to anywhere.
Apple has been restrictive to developers, and that has been the way with Steve Jobs. They've locked down many APIs (even abruptly deprecated them) and punished apps that don't conform to Apple's consistent look and feel. So in that sense, Apple may not be the friendliest to developers, but it has pushed a more consistent product. Perhaps these restrictions are why Apple's products give all users a good experience despite more annoyances to the developer.