def METHOD_NAME(self, minver=()):
	"""
	Checks if ruby is installed.
	If installed the variable RUBY will be set in environment.
	The ruby binary can be overridden by ``--with-ruby-binary`` command-line option.
	"""
	ruby = self.find_program('ruby', var='RUBY', value=Options.options.rubybinary)
	try:
		version = self.cmd_and_log(ruby + ['-e', 'puts defined?(VERSION) ? VERSION : RUBY_VERSION']).strip()
	except Errors.WafError:
		self.fatal('could not determine ruby version')
	self.env.RUBY_VERSION = version
	try:
		ver = tuple(map(int, version.split('.')))
	except Errors.WafError:
		self.fatal('unsupported ruby version %r' % version)
	cver = ''
	if minver:
		cver = '> ' + '.'.join(str(x) for x in minver)
		if ver < minver:
			self.fatal('ruby is too old %r' % ver)
	self.msg('Checking for ruby version %s' % cver, version)