radanskoric's sibling comment is correct (but flagged).
Most Ruby devs I know are on Macs and none of them are running the ancient version Apple installs. Just like with most other languages, even JavaScript, you'll want to get a current or recent version.
Either use a version manager like RVM (popular) or ASDF (my favorite tool since it handles nearly all languages). You can also install Ruby with Homebrew, but I don't recommend using Homebrew for managing programming languages since you may want different versions on different projects.