how to check ruby version

puts RUBY_VERSION
  1. puts is a method used in Ruby to output information to the console.
  2. RUBY_VERSION is a built-in constant in Ruby that holds the current version of the Ruby interpreter.
  3. By using puts RUBY_VERSION, the current Ruby version installed on your system will be displayed in the console when you execute this code.