Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The Ruby Programming Language
Ruby C HTML Yacc Makefile Emacs Lisp Other
Latest commit b08bfaf svn * 2015-11-28
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Failed to load latest commit information.
benchmark io.c: avoid kwarg parsing in C API
bin * bin/erb: $SAFE=3 is obsolete.
bootstraptest * bootstraptest/test_fork.rb ([ruby-dev:37934]): :NPROC (RLIMIT_NPROC)
ccan ccan/list/list.h: suppress unused argument warnings
coverage fix a typo [ci skip]
cygwin win32.c: fake lchown
defs * compile.c (iseq_compile_each): add debug information to NODE_STR
doc * doc/syntax/refinements.rdoc: update documentation to reflect
enc * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:
ext fixup! r52695
gems * gems/bundled_gems: bump version to minitest-5.8.3
include Drop support for BeOS
lib fixup! * lib/net/http.rb (connect): detect closed connection and reco…
man ruby.1: --dump [ci skip]
misc parse.y: ANDDOT fluent interface
missing * ChangeLog: Good-bye OS/2.
nacl Fix PNaCl configure/link errors.
sample * sample/exyacc.rb: Fix some typos.
spec * spec/default.mspec: use default configuration file name.
template block comment
test test_parser_events.rb: suppress a warning
tool Use more tough server: GitHub or
win32 * win32/win32.c (finish_overlapped_socket): return value of this
.document * .document: removed needless entries.
.editorconfig .editorconfig: new
.gdbinit rbi
.gitattributes add .gitattributes
.gitignore * test/runner.rb: use official repository for coverage tool. * added for ruby-style.
.travis.yml * .travis.yml: retry.
BSDL * BSDL: update copyright notice for 2013. [DOC] Please see _the_ official issue tracker... [ci skip]
COPYING * COPYING: change Ruby's License from a dual license with GPLv2
COPYING.ja Change encoding from EUC-JP to UTF-8. [Feature #5128]
ChangeLog * lib/net/http.rb (connect): detect closed connection and reconnect
GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
KNOWNBUGS.rb * test/ruby/test_method.rb (test_unlinked_method_entry_in_method_obje…
LEGAL LEGAL: adjust style * test/runner.rb: use official repository for coverage tool.
NEWS add NEWS entry about --debug=frozen-string-literal
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.
aclocal.m4 tty at reconfig
addr2line.c * addr2line.c (fill_lines): get base addrs in fill_lines to use it
addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite
array.c * array.c: clarify docs for take_while/drop_while samples.
bignum.c preserve encodings in error messages
class.c * class.c: fix documentation for rb_define_class{_id}_under. * ext/extmk.rb (--extflags): new option to pass EXTLDFLAGS to children,
compar.c compar.c: variable name [ci skip]
compile.c compile.c: tailcall opt for indexers
complex.c preserve encodings in error messages color to ifchange
constant.h variable.c: Module#deprecate_constant
cont.c cont.c: append to continuations doc [ci skip]
debug.c ruby.h: add prefix
dir.c use rb_gc_for_fd for more callers
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 ENC_ASSERT
enum.c add a comment.
enumerator.c preserve encodings in error messages
error.c * compile.c (iseq_compile_each): add debug information to NODE_STR
eval.c * vm.c (rb_vm_cref_replace_with_duplicated_cref): added.
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 Drop support for BeOS
gc.c * gc.c (rb_raw_obj_info): fix compile errors when USE_RGENGC
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 update rdoc of dig methods [ci skip]
ia64.s * removed trailing spaces.
id_table.c id_table: const correctness for _size and _memsize
id_table.h id_table: const correctness for _size and _memsize
inits.c * internal.h: Include ruby.h and ruby/encoding.h to be
insns.def * compile.c (iseq_compile_each): add debug information to NODE_STR
internal.h internal.h: export rb_gc_for_fd
io.c io.c: try to_io first
iseq.c iseq.h: rename member
iseq.h iseq.h: rename member
lex.c.blt keywords: make name singed
load.c internal.h: RUBY_DTRACE_HOOK
loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
localeinit.c localeinit.c: encindex.h
main.c * include/ruby/debug.h: introdudced.
marshal.c marshal.c: reduce arity checks
math.c object.c: rb_num_to_dbl
method.h * method.h: introduce the folliwing field and macros.
miniinit.c encoding.c: find encoding index
node.c Safe navigation operator
node.h additional fix of comment line
numeric.c * numeric.c: Good-by Borland-C.
object.c struct.c: dig
pack.c * pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for
parse.y parse.y: reduce ifdefs
prelude.rb prelude.rb: deprecate Thread.exclusive
probes.d change lingering dtrace probe documentation from function- to method-
probes_helper.h vm.c: ruby_th_dtrace_setup
proc.c * proc.c: Add call-seq of `Method#super_method`
process.c process.c: fix rdoc of Process.getsid [ci skip]
random.c random.c: comment [ci skip]
range.c NameError#receiver of uninitialized constant
rational.c rational.c: preserve encoding in exception
re.c re.c: indent [ci skip]
regcomp.c * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:
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 * remove trailing spaces.
regint.h * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:
regparse.c regparse.c: remove unused variable
regparse.h * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544
regsyntax.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
ruby.c iseq.h: rename member
ruby_atomic.h ruby_atomic.h: fix typo
safe.c * safe.c: removed needless doc related $SAFE=2
signal.c Drop support for BeOS
siphash.c UNALIGNED_WORD_ACCESS on ppc64
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: nil value is valid
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: use predefined IDs for minor bloat reduction
struct.c update rdoc of dig methods [ci skip]
symbol.c symbol.c: not freeze the receiver
symbol.h * ext/objspace/objspace.c: add a new method ObjectSpace.count_symbols.
thread.c thread.c (rb_cThreadShield): make static
thread_pthread.c Haiku now best effort support
thread_pthread.h thread_pthread: prefer rb_nativethread* types/functions
thread_sync.c * thread_sync.c: reduce the specification of Queue#close.
thread_win32.c improve handling of timer thread shutdown
thread_win32.h * ext/openssl/depend: remove dependency from internal headers.
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: fix a typo
transcode_data.h transcode_data.h: missing cast
util.c util.c: BSD qsort_r
variable.c variable.c (rb_autoload_load): allow recursive calls
version.c scan version.c
version.h * 2015-11-28
vm.c * vm.c (rb_vm_cref_replace_with_duplicated_cref): added.
vm_args.c vm_args.c: symbol proc
vm_backtrace.c * make rb_iseq_t T_IMEMO object (type is imemo_iseq).
vm_core.h fiddle: release GVL for ffi_call
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
vm_dump.c * vm_dump.c (rb_print_backtrace): our addr2line doesn't work on sparc.
vm_eval.c * vm.c (rb_vm_cref_replace_with_duplicated_cref): added.
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.c (rb_vm_cref_replace_with_duplicated_cref): added.
vm_insnhelper.h * refactoring CREF related code.
vm_method.c * vm_method.c (rb_class_clear_method_cache): should clear all
vm_opts.h iseq.h: rename member
vm_trace.c * vm_trace.c (exec_hooks_precheck): check need_clean everytime
vsnprintf.c vsnprintf.c: constify

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.