There are specific versions of Ruby tested specifically for Puppet while some versions are not tested. You can run the command “ruby -version” for checking the version of Ruby on the system. Puppet versions after Puppet 4 do not depend on Ruby version of the OS because it bundles own Ruby environment.
Now, you could install a puppet agent with any version of Ruby or for any systems without installing Ruby. Puppet Enterprise does not depend on the Ruby version of the OS because of the bundling of its own Ruby environment. PE installation with another version of Ruby or in systems without Ruby installation is possible.