The Ruby Programming Language
Ruby C HTML Yacc C++ Makefile Other
Pull request Compare This branch is 237 commits ahead, 3590 commits behind ruby:trunk.
Latest commit f5e7870 Nov 23, 2016 @vmg vmg committed on GitHub Merge pull request #35 from github/inspec-ivar-segv
Stop reading past the end of `ivptr` array
Permalink
Failed to load latest commit information.
benchmark * benchmark/bm_app_aobench.rb: fix typos. Dec 14, 2015
bin * bin/erb: $SAFE=3 is obsolete. Jun 18, 2015
bootstraptest * bootstraptest/runner.rb: use safe navigation operator. Dec 14, 2015
ccan ccan/list/list.h: suppress unused argument warnings Sep 6, 2015
coverage fix a typo [ci skip] Sep 12, 2014
cygwin merge revision(s) 54086,54211,54233: [Backport #12199] Apr 18, 2016
defs merge revision(s) 53753,54131: [Backport #8851] Apr 18, 2016
doc merge revision(s) 53320,54756: [Backport #12246] Apr 25, 2016
enc merge revision(s) 54129,54130,54132: [Backport #11844] Mar 29, 2016
ext merge revision(s) 56559,56582,56584,56585: [Backport #12903] Nov 14, 2016
gems * gems/bundled_gems: update minitest to 5.8.5. Sep 26, 2016
include merge revision(s) 54168: [Backport #12391] Jul 11, 2016
lib merge revision(s) 53668: [Backport #12759] Nov 21, 2016
man merge revision(s) 55984: [Backport #12692] Sep 25, 2016
misc parse.y: ANDDOT fluent interface Nov 12, 2015
missing merge revision(s) 55232: [Backport #12823] Oct 17, 2016
nacl Fix PNaCl configure/link errors. Oct 22, 2014
sample * properties. Dec 11, 2015
spec merge revision(s) 56682: [Backport #12922] Nov 11, 2016
template merge revision(s) 54758: Apr 25, 2016
test merge revision(s) 56267,56268: [Backport #12943] Nov 19, 2016
tool merge revision(s) 56399: Oct 12, 2016
win32 merge revision(s) 55729: [Backport #12611] Aug 18, 2016
.document * .document: removed needless entries. Mar 25, 2015
.editorconfig .editorconfig: new Sep 15, 2012
.gdbinit rbi Nov 10, 2015
.gitattributes add .gitattributes Nov 19, 2015
.gitignore * .gitignore: ignored ISeq binary format. Dec 9, 2015
.indent.pro * .indent.pro: added for ruby-style. Mar 11, 2010
.travis.yml merge revision(s) 53517,53519,53521,53522,53523,53526,53527: Mar 29, 2016
BSDL * BSDL: update copyright notice for 2013. Feb 9, 2013
CONTRIBUTING.md [DOC] Please see _the_ official issue tracker... [ci skip] Jun 13, 2014
COPYING * COPYING: change Ruby's License from a dual license with GPLv2 Sep 15, 2010
COPYING.ja Change encoding from EUC-JP to UTF-8. [Feature #5128] Sep 4, 2011
ChangeLog merge revision(s) 53668: [Backport #12759] Nov 21, 2016
GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328] Jun 3, 2012
KNOWNBUGS.rb KNOWNBUGS.rb: Fixed typo, made more explicit [ci skip] Dec 13, 2015
LEGAL LEGAL: adjust style Aug 17, 2015
Makefile.in merge revision(s) 53607: Jan 21, 2016
NEWS * NEWS: added entry for CGI.escapeHTML optimization. Dec 24, 2015
README.EXT README.EXT: add redirect [ruby-core:68631] Mar 25, 2015
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631] Mar 30, 2015
README.ja.md README.ja.md: fix markup miss. [ci skip] Jun 10, 2015
README.md * README.md: improve markdown rendering for readable. Sep 12, 2015
aclocal.m4 Makefile.in: tty at reconfig Oct 21, 2015
addr2line.c * addr2line.c (fill_lines): get base addrs in fill_lines to use it Apr 14, 2014
addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite Mar 26, 2014
array.c merge revision(s) 56111: [Backport #12738] Sep 25, 2016
bignum.c merge revision(s) 54168: [Backport #12391] Jul 11, 2016
class.c gc.c: do not expose internal singleton class Dec 22, 2015
common.mk merge revision(s) 55434: [Backport #12401] Aug 11, 2016
compar.c * compar.c: Update doc for == [#7688] [ci-skip] Dec 15, 2015
compile.c merge revision(s) 56208,56663: [Backport #12905] Nov 11, 2016
complex.c merge revision(s) 54896,54897: [Backport #12343] May 3, 2016
configure.in merge revision(s) 54716,54719,54750: [Backport #12314] Apr 24, 2016
constant.h variable.c: Module#deprecate_constant Jul 30, 2015
cont.c merge revision(s) 56561: [Backport #12893] Nov 11, 2016
debug.c ruby.h: add prefix Sep 13, 2015
dir.c merge revision(s) 55120: [Backport #12413] Jun 13, 2016
dln.c Drop support for BeOS Nov 24, 2015
dln.h dln.c: extra arguments Jun 30, 2013
dln_find.c * ChangeLog: Good-bye OS/2. Oct 18, 2015
dmydln.c * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control Apr 13, 2012
dmyenc.c load.c: tweak the return value Dec 3, 2014
dmyext.c dmyenc.c: separate Nov 27, 2014
encindex.h revert r52336 (commit miss) Oct 29, 2015
encoding.c merge revision(s) 55547,55551,55552,55555,55557,55559,55575,55691,555… Aug 22, 2016
enum.c * enum.c: fix a typo in documentation. Dec 14, 2015
enumerator.c enumerator.c: use ALLOCV Dec 15, 2015
error.c merge revision(s) 56766,56767: [Backport #12925] Nov 14, 2016
eval.c merge revision(s) 56766,56767: [Backport #12925] Nov 14, 2016
eval_error.c merge revision(s) 56766,56767: [Backport #12925] Nov 14, 2016
eval_intern.h merge revision(s) 56252,56254: [Backport #12743] Oct 17, 2016
eval_jump.c merge revision(s) 54681: [Backport #12302] Apr 22, 2016
file.c merge revision(s) 55385,55390: [Backport #12483] Aug 15, 2016
gc.c merge revision(s) 55663: [Backport #12583] Aug 16, 2016
gc.h * gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj) Oct 6, 2015
gem_prelude.rb * ruby.c (usage, enable_option, disable_option, process_options): new Sep 9, 2015
golf_prelude.rb * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425] Nov 7, 2013
goruby.c goruby.c: suppress warning Aug 10, 2014
hash.c merge revision(s) 54168: [Backport #12391] Jul 11, 2016
ia64.s * removed trailing spaces. Jun 9, 2012
id_table.c merge revision(s) 55896: [Backport #12614] Aug 26, 2016
id_table.h id_table: const correctness for _size and _memsize Nov 2, 2015
inits.c * random.c (InitVM_Random): move Random::DEFAULT initialization Nov 30, 2015
insns.def merge revision(s) 54970: [Backport #12367] Jun 13, 2016
internal.h merge revision(s) 55547,55551,55552,55555,55557,55559,55575,55691,555… Aug 22, 2016
io.c merge revision(s) 56416: [Backport #12836] Nov 5, 2016
iseq.c merge revision(s) 56267,56268: [Backport #12943] Nov 19, 2016
iseq.h * introduce new ISeq binary format serializer/de-serializer Dec 8, 2015
lex.c.blt merge revision(s) 53753,54131: [Backport #8851] Apr 18, 2016
load.c merge revision(s) 56363,56365: [Backport #12811] Oct 17, 2016
loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h Jun 17, 2013
localeinit.c merge revision(s) 54256,54291,54292,54293: [Backport #12118] [Bug #12… Mar 29, 2016
main.c * include/ruby/debug.h: introdudced. Nov 20, 2012
marshal.c merge revision(s) 54105,54108,54136,54138: [Backport #12188] Mar 29, 2016
math.c merge revision(s) 54492,54494,54495,54496,54499,54503: [Backport #12249] Apr 18, 2016
method.h * method.h: introduce the folliwing field and macros. Nov 18, 2015
miniinit.c merge revision(s) 53315: [Backport #11872] Apr 22, 2016
node.c node.c: NODE_QCALL Dec 5, 2015
node.h * compile.c: fix typos. Dec 14, 2015
numeric.c merge revision(s) 55123,55129,55130,55133,55136: [Backport #12414] Jun 18, 2016
object.c merge revision(s) 56421,56422: [Backport #11736] Nov 11, 2016
pack.c merge revision(s) 55573: [Backport #12209] Aug 10, 2016
parse.y merge revision(s) 53424,55509: [Backport #12517] Aug 16, 2016
prelude.rb add missing options to call-seq of IO#read_nonblock Dec 7, 2015
probes.d change lingering dtrace probe documentation from function- to method- May 30, 2015
probes_helper.h vm.c: ruby_th_dtrace_setup Oct 29, 2015
proc.c * iseq.c (proc_dup): don't duplicate sym_procs. [Fix GH-1479] Nov 19, 2016
process.c merge revision(s) 55090,55091: [Backport #12398] Aug 11, 2016
random.c * *.c (*_memsize): do not check ptr. Dec 9, 2015
range.c merge revision(s) 53635: [Backport #12003] Mar 29, 2016
rational.c rational.c: preserve encoding in exception Sep 11, 2015
re.c merge revision(s) 55163,55165: [Backport #12420] Jun 19, 2016
regcomp.c merge revision(s) 55562: [Backport #12454] Aug 15, 2016
regenc.c * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c: Nov 26, 2015
regenc.h oniguruma.h: constify Aug 27, 2015
regerror.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09. Jul 16, 2014
regexec.c regexec.c: fix build with direct threaded VM Dec 22, 2015
regint.h Revert r52995 Dec 9, 2015
regparse.c merge revision(s) 55163,55165: [Backport #12420] Jun 19, 2016
regparse.h regparse.h: ANSI alias rule fix Dec 9, 2015
regsyntax.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820] Feb 17, 2012
ruby.c merge revision(s) 54720: [Backport #12184] Apr 23, 2016
ruby_atomic.h Revert r52995 Dec 9, 2015
safe.c * safe.c: removed needless doc related $SAFE=2 Jun 18, 2015
signal.c Drop support for BeOS Nov 24, 2015
siphash.c UNALIGNED_WORD_ACCESS on ppc64 Jul 23, 2014
siphash.h * siphash.h: check configure macros before include newer headers. Nov 9, 2012
sparc.c * sparc.c: Use __asm__ instead of asm for gcc. Apr 27, 2013
sprintf.c merge revision(s) 53533: [Backport #12895] Nov 5, 2016
st.c st.c: constify st_table* in private functions Jul 29, 2015
strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range. Apr 6, 2013
string.c merge revision(s) 55547,55551,55552,55555,55557,55559,55575,55691,555… Aug 22, 2016
struct.c merge revision(s) 54611,54612: [Backport #12291] Apr 18, 2016
symbol.c symbol.c: rb_sym_intern Nov 30, 2015
symbol.h merge revision(s) 53485: [Backport #11976] Mar 29, 2016
thread.c merge revision(s) 53449: [Backport #11959] Nov 5, 2016
thread_pthread.c merge revision(s) 54598,54600: [Backport #12290] Apr 15, 2016
thread_pthread.h * thread_pthread.c (register_ubf_list): renamed from Nov 30, 2015
thread_sync.c * *.c (*_memsize): do not check ptr. Dec 9, 2015
thread_win32.c * thread_pthread.c (register_ubf_list): renamed from Nov 30, 2015
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. May 14, 2014
time.c * time.c (rb_time_timespec_new): swap utc and localtime Nov 10, 2015
timev.h configure.in, win32/Makefile.sub: PACKED_STRUCT with VC Feb 25, 2014
transcode.c merge revision(s) 55181: [Backport #12431] Aug 15, 2016
transcode_data.h transcode_data.h: missing cast Aug 8, 2015
util.c prefer rb_syserr_fail Dec 23, 2015
variable.c Merge pull request #35 from github/inspec-ivar-segv Nov 23, 2016
version.c version.c: remove ruby_engine_name Nov 29, 2015
version.h merge revision(s) 53668: [Backport #12759] Nov 21, 2016
vm.c merge revision(s) 55729: [Backport #12611] Aug 18, 2016
vm_args.c merge revision(s) 55609: [Backport #12568] Aug 18, 2016
vm_backtrace.c vm_backtrace.c: ignore ifunc frames Dec 21, 2015
vm_core.h merge revision(s) 54484: [Backport #12095] Apr 18, 2016
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} Apr 5, 2013
vm_dump.c merge revision(s) 56030,56035: [Backport #12711] Sep 26, 2016
vm_eval.c merge revision(s) 56694,56698: [Backport #12920] Nov 16, 2016
vm_exec.c * vm_core.h: constify rb_iseq_constant_body::iseq_encoded and Jul 23, 2015
vm_exec.h * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added. Dec 18, 2013
vm_insnhelper.c merge revision(s) 55297: [Backport #12462] Jul 30, 2016
vm_insnhelper.h * refactoring CREF related code. Nov 13, 2015
vm_method.c * vm_method.c: revert r55869. it breaks Integer#days with Aug 27, 2016
vm_opts.h iseq.h: rename member Nov 25, 2015
vm_trace.c * enum.c: fix a typo in documentation. Dec 14, 2015
vsnprintf.c * compile.c: fix typos. Dec 14, 2015

README.md

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. http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatforms

How to get Ruby

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

http://www.ruby-lang.org/en/downloads/

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

ftp://ftp.ruby-lang.org/pub/ruby/

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

$ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby

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

$ git clone git://github.com/ruby/ruby.git

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

$ svn ls http://svn.ruby-lang.org/repos/ruby/branches/

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

$ git ls-remote git://github.com/ruby/ruby.git

Ruby home page

The URL of the Ruby home page is:

http://www.ruby-lang.org/

Mailing list

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

subscribe

in the mail body (not subject) to the address ruby-talk-request@ruby-lang.org.

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 configure.in, 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.

Copying

See the file COPYING.

Feedback

Questions about the Ruby language can be asked on the Ruby-Talk mailing list (http://www.ruby-lang.org/en/community/mailing-lists) or on websites like (http://stackoverflow.com).

Bug reports should be filed at http://bugs.ruby-lang.org. Read HowToReport for more information.

Contributing

See the file CONTRIBUTING.md

The Author

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

matz@ruby-lang.org