Skip to content
The Ruby Programming Language
Ruby C HTML Yacc Makefile Emacs Lisp Other
Find file
Pull request Compare This branch is 535 commits behind ruby:trunk.
Latest commit 7f71cdc svn * 2015-12-24
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Failed to load latest commit information.
benchmark * benchmark/bm_app_aobench.rb: fix typos.
bin * bin/erb: $SAFE=3 is obsolete.
bootstraptest * bootstraptest/runner.rb: use safe navigation operator.
ccan ccan/list/list.h: suppress unused argument warnings
doc Fix typo in contributing docs [ci skip]
enc * enc/windows_1250.c: Should not use C++ style comments (C99 feature).
ext io/console: fix gem build failure on Windows
gems * gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0
include rb_readwrite_syserr_fail
lib [DOC] Fix typos
man ruby.1: --dump [ci skip]
misc parse.y: ANDDOT fluent interface
missing explicit_bzero.c: fix typos
sample * properties.
spec * spec/default.mspec: use default configuration file name.
template * lib/erb.rb: revert r53123. It break compatibility like thor and rsp…
test Revert r53253. naruse fixed it differently in r53244
tool * remove trailing spaces.
.document * .document: removed needless entries.
.editorconfig .editorconfig: new
.gdbinit rbi
.gitattributes add .gitattributes
.gitignore * .gitignore: ignored ISeq binary format. * added for ruby-style.
.travis.yml * .travis.yml: retry.
BSDL * BSDL: update copyright notice for 2013.
ChangeLog io/console: fix gem build failure on Windows
GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
KNOWNBUGS.rb KNOWNBUGS.rb: Fixed typo, made more explicit [ci skip]
LEGAL LEGAL: adjust style
NEWS io/console: fix gem build failure on Windows
README.EXT README.EXT: add redirect [ruby-core:68631]
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631] fix markup miss. [ci skip] * improve markdown rendering for readable.
addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite
bignum.c make local symbols static
class.c gc.c: do not expose internal singleton class help of exam [ci skip]
compar.c * compar.c: Update doc for == [#7688] [ci-skip]
compile.c * compile.c (ibf_load_object_string): use fstring if frozen string.
complex.c preserve encodings in error messages
cont.c * cont.c: fix a double word typo.
debug.c ruby.h: add prefix
dir.c * compile.c: fix typos.
dln.c Drop support for BeOS
dln.h dln.c: extra arguments
dln_find.c * ChangeLog: Good-bye OS/2.
dmydln.c * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
dmyenc.c load.c: tweak the return value
dmyext.c dmyenc.c: separate
encindex.h revert r52336 (commit miss)
encoding.c * introduce new ISeq binary format serializer/de-serializer
enumerator.c enumerator.c: use ALLOCV
error.c io.c: encoding in warnings
eval_error.c eval_error.c: Fix a format of `NameError#message`
eval_intern.h * vm.c (rb_vm_cref_replace_with_duplicated_cref): added.
eval_jump.c eval.c: use the given thread
file.c prefer rb_syserr_fail
gc.c gc.c: do not expose internal singleton class
gc.h * gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj)
gem_prelude.rb * ruby.c (usage, enable_option, disable_option, process_options): new
golf_prelude.rb * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
goruby.c goruby.c: suppress warning
hash.c * gc.c: Delete excess semicolon after RUBY_ALIAS_FUNCTION().
id_table.c id_table: const correctness for _size and _memsize
inits.c * random.c (InitVM_Random): move Random::DEFAULT initialization
internal.h gc.c: do not expose internal singleton class
io.c rb_readwrite_syserr_fail
iseq.c * enum.c: fix a typo in documentation.
iseq.h * introduce new ISeq binary format serializer/de-serializer
lex.c.blt keywords: make name singed
load.c * introduce new ISeq binary format serializer/de-serializer
loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
main.c * include/ruby/debug.h: introdudced.
marshal.c marshal.c: remove NULL checks for *_memsize
math.c object.c: rb_num_to_dbl
node.c node.c: NODE_QCALL
node.h * compile.c: fix typos.
object.c * object.c (rb_inspect): check the default internal encoding as
pack.c pack.c: check index range
parse.y parse.y: labeled heredoc
prelude.rb add missing options to call-seq of IO#read_nonblock
probes.d change lingering dtrace probe documentation from function- to method-
probes_helper.h vm.c: ruby_th_dtrace_setup
proc.c * proc.c (rb_mod_define_method): should check Symbol or not.
process.c prefer rb_syserr_fail
random.c * *.c (*_memsize): do not check ptr.
range.c range.c: infected by the receiver
rational.c rational.c: preserve encoding in exception
re.c re.c: names encoding
regcomp.c Revert r52995
regenc.c * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:
regenc.h oniguruma.h: constify
regerror.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
regexec.c regexec.c: fix build with direct threaded VM
regint.h Revert r52995
regparse.c Revert r52995
ruby.c version.c: remove ruby_engine_name
ruby_atomic.h Revert r52995
safe.c * safe.c: removed needless doc related $SAFE=2
signal.c Drop support for BeOS
siphash.h * siphash.h: check configure macros before include newer headers.
sparc.c * sparc.c: Use __asm__ instead of asm for gcc.
sprintf.c sprintf.c: fix garbage inserted with Rational
st.c st.c: constify st_table* in private functions
strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range.
string.c * string.c: Fix document. Default value of the first
struct.c * array.c: Improve and fix documentation for Array#dig
symbol.c symbol.c: rb_sym_intern
symbol.h * ext/objspace/objspace.c: add a new method ObjectSpace.count_symbols.
thread_pthread.c * compile.c: fix typos.
thread_win32.c * thread_pthread.c (register_ubf_list): renamed from
time.c * time.c (rb_time_timespec_new): swap utc and localtime
timev.h, win32/Makefile.sub: PACKED_STRUCT with VC
transcode.c transcode.c: infection
transcode_data.h transcode_data.h: missing cast
util.c prefer rb_syserr_fail
variable.c * variable.c (struct ivar_update): rename "extended" to "iv_extended"
version.c version.c: remove ruby_engine_name
version.h * 2015-12-24
vm.c * vm.c (vm_exec): call RUBY_DTRACE_CMETHOD_RETURN_HOOK instead of
vm_args.c * vm_args.c (vm_caller_setup_arg_block): remove code for ifunc
vm_backtrace.c vm_backtrace.c: ignore ifunc frames
vm_core.h * vm_core.h: define USE_LAZY_LOAD if it is not defined.
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
vm_eval.c vm_eval.c: hook after method_missing
vm_exec.c * vm_core.h: constify rb_iseq_constant_body::iseq_encoded and
vm_exec.h * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
vm_insnhelper.c * vm_insnhelper.c: move vm_callee_setup_block_arg() (and related
vm_method.c * vm_method.c (rb_method_entry_make, check_override_opt_method):
vm_trace.c * enum.c: fix a typo in documentation.
vsnprintf.c * compile.c: fix typos.

What's Ruby

Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible.

Features of Ruby

  • Simple Syntax
  • Normal Object-oriented Features (e.g. class, method calls)
  • Advanced Object-oriented Features (e.g. Mix-in, Singleton-method)
  • Operator Overloading
  • Exception Handling
  • Iterators and Closures
  • Garbage Collection
  • Dynamic Loading of Object Files (on some architectures)
  • Highly Portable (works on many Unix-like/POSIX compatible platforms as well as Windows, Mac OS X, BeOS, etc.) cf.

How to get Ruby

For a complete list of ways to install Ruby, including using third-party tools like rvm, see:

The Ruby distribution files can be found on the following FTP site:

The trunk of the Ruby source tree can be checked out with the following command:

$ svn co ruby

Or if you are using git then use the following command:

$ git clone git://

There are some other branches under development. Try the following command to see the list of branches:

$ svn ls

Or if you are using git then use the following command:

$ git ls-remote git://

Ruby home page

The URL of the Ruby home page is:

Mailing list

There is a mailing list to talk about Ruby. To subscribe this list, please send the following phrase:


in the mail body (not subject) to the address

How to compile and install

This is what you need to do to compile and install Ruby:

  1. If you want to use Microsoft Visual C++ to compile ruby, read win32/README.win32 instead of this document.

  2. If ./configure does not exist or is older than, run autoconf to (re)generate configure.

  3. Run ./configure, which will generate config.h and Makefile.

    Some C compiler flags may be added by default depending on your environment. Specify optflags=.. and warnflags=.. as necessary to override them.

  4. Edit defines.h if you need. Usually this step will not be needed.

  5. Remove comment mark(#) before the module names from ext/Setup (or add module names if not present), if you want to link modules statically.

    If you don't want to compile non static extension modules (probably on architectures which do not allow dynamic loading), remove comment mark from the line "#option nodynamic" in ext/Setup.

    Usually this step will not be needed.

  6. Run make.

  7. Optionally, run 'make check' to check whether the compiled Ruby interpreter works well. If you see the message "check succeeded", your ruby works as it should (hopefully).

  8. Run 'make install'

    This command will create following directories and install files onto them.

    • ${DESTDIR}${prefix}/bin
    • ${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}
    • ${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}
    • ${DESTDIR}${prefix}/lib
    • ${DESTDIR}${prefix}/lib/ruby
    • ${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}
    • ${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}
    • ${DESTDIR}${prefix}/lib/ruby/site_ruby
    • ${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}
    • ${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}
    • ${DESTDIR}${prefix}/lib/ruby/vendor_ruby
    • ${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}
    • ${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}
    • ${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}
    • ${DESTDIR}${prefix}/share/man/man1
    • ${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system

    If Ruby's API version is 'x.y.z', the ${MAJOR} is 'x', the ${MINOR} is 'y', and the ${TEENY} is 'z'.

    NOTE: teeny of the API version may be different from one of Ruby's program version

    You may have to be a super user to install ruby.

If you fail to compile ruby, please send the detailed error report with the error log and machine/OS type, to help others.

Some extension libraries may not get compiled because of lack of necessary external libraries and/or headers, then you will need to run 'make distclean-ext' to remove old configuration after installing them in such case.


See the file COPYING.


Questions about the Ruby language can be asked on the Ruby-Talk mailing list ( or on websites like (

Bug reports should be filed at Read HowToReport for more information.


See the file

The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.

Something went wrong with that request. Please try again.