Ruby Basic Exercises: Get ruby version with patch number
Ruby Basic: Exercise-1 with Solution
Write Ruby program to get ruby version with patch number.
Ruby Code:
puts "Ruby Version: "+RUBY_VERSION
puts "Ruby Patch Level: "+RUBY_PATCHLEVEL.to_s
Output:
Ruby Version: 2.4.2 Ruby Patch Level: 198
Flowchart:
Ruby Code Editor:
Contribute your code and comments through Disqus.
Previous: Ruby Basic Exercises
Next: Write a Ruby program to display the current date and time.
What is the difficulty level of this exercise?
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/ruby-exercises/basic/ruby-basic-exercise-1.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics