[RUBY] Find out the version of the language you are running

I often check the operation with ideone to post to Qiita. For example, I can't know what version of Ruby is running. (Maybe there should be) To check, the runtime should output your version, so I will summarize it.

Program that outputs the version

Ruby

puts RUBY_VERSION # => 1.9.3

PHP

<?php
echo phpversion(); // => 5.4.4-12

Added from comments

<?php
echo PHP_VERSION; // => 5.4.4-12

Python

import sys
print(sys.version) # => 3.2.3 (default, Sep 10 2012, 12:58:42) 

.NET (by C#)

Corrected from System.Reflection.Assembly.GetExecutingAssembly (). ImageRuntimeVersion after being pointed out in the comment

public class Test {
  public static void Main() {
    System.Console.WriteLine(System.Environment.Version); // => 2.0.50727.1433
  }
}

Environment.Version Property

Get a Version object that describes the major version number, minor version number, build number, and revision number of the common language runtime.

Assembly.ImageRuntimeVersion Property

Gets a string that represents the version of the common language runtime (CLR) stored in the file that contains the manifest.

I see.

the end

As a result, the version was older than expected. I'm tired of it (or rather, this is enough for me), so I'd like to ask someone to continue.

Recommended Posts

Find out the version of the language you are running
Get the absolute path of the script you are running
Migemo version of the: find command,: mfind
Check the type of the variable you are using
Find out the day of the week with datetime
Find out the location of Python class definition files.
Find out the location of packages installed with pip
Align the version of chromedriver_binary
Maya | Find out the number of polygons in the selected object
Find out the apparent width of a string in python
Python --Find out number of groups in the regex expression
Test the version of the argparse module
Find the definition of the value of errno
Raise the version of pyenv itself
Find out the age and number of winnings of prefectural governors nationwide
pyenv-change the python version of virtualenv
Find out the mystery change of Pokédex description by Levenshtein distance
Change the Python version of Homebrew
[Completed version] Try to find out the number of residents in the town from the address list with Python
How to find out the number of CPUs without using the sar command
I tried to solve the 2020 version of 100 language processing [Chapter 3: Regular expressions 25-29]
Try using n to downgrade the version of Node.js you have installed
The story of running the asp.net core 3.1 app on arm64 version Amazon Linux 2
Find out the name of the method that called it from the method that is python
How to check the version of Django
About the virtual environment of python version 3.7
Find out the CentOS7 MAC address (HWADDR)
[Python] Try pydash of the Python version of lodash
About the development environment you are using
The basics of running NoxPlayer in Python
Find the coefficients of the least squares polynomial
I tried to solve the 2020 version of 100 language processing knocks [Chapter 3: Regular expressions 20 to 24]
You will be an engineer in 100 days --Day 29 --Python --Basics of the Python language 5
How to find out what kind of files are stored in S3 in Python
A programming beginner tried to find out the execution time of sorting etc.
You will be an engineer in 100 days --Day 33 --Python --Basics of the Python language 8
You will be an engineer in 100 days --Day 26 --Python --Basics of the Python language 3
You will be an engineer in 100 days --Day 32 --Python --Basics of the Python language 7
I tried to solve the 2020 version of 100 language processing knocks [Chapter 1: Preparatory movement 00-04]
I tried to solve the 2020 version of 100 language processing knocks [Chapter 1: Preparatory movement 05-09]
You will be an engineer in 100 days --Day 28 --Python --Basics of the Python language 4
Try the python version of emacs-org parser orgparse
How to find the area of the Voronoi diagram
The contents of the Python tutorial (Chapter 5) are itemized.
The contents of the Python tutorial (Chapter 4) are itemized.
The contents of the Python tutorial (Chapter 2) are itemized.
The contents of the Python tutorial (Chapter 8) are itemized.
The contents of the Python tutorial (Chapter 1) are itemized.
The story of making the Mel Icon Generator version2
Watch out for the return value of __len__
Use the latest version of PyCharm on Ubuntu
Find the number of days in a month
The contents of the Python tutorial (Chapter 10) are itemized.
A note about the python version of python virtualenv
Find the divisor of the value entered in python
Try the free version of Progate [Python I]
Find the solution of the nth-order equation in python
Enter into stdin of the running Docker container
The contents of the Python tutorial (Chapter 6) are itemized.
Find the geometric mean of n! Using Python
Change the resolution of Ubuntu running on VirtualBox