Skip to content
The Ruby Programming Language
Ruby C HTML Yacc Makefile Emacs Lisp Other
Latest commit 1e3fc7d Jul 1, 2016 @nurse nurse * regcomp.c (noname_disable_map): don't optimize out group 0
  Ruby's Regexp doesn't allow normal numbered groups if the regexp
  has named groups. On such case it optimizes out related NT_ENCLOSE.
  But even on the case it can use \g<0>.
  This fix not to remove NT_ENCLOSE whose regnum is 0.
  [ruby-core:75828] [Bug #12454]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Failed to load latest commit information.
basictest Use Integer instead of Fixnum and Bignum. May 17, 2016
benchmark * benchmark/bm_so_meteor_contest.rb: fix a typo. Apr 22, 2016
bin * bin/erb: $SAFE=3 is obsolete. Jun 18, 2015
bootstraptest bootstraptest/runner.rb may run on older ruby Jun 28, 2016
ccan ccan/list/list.h: suppress unused argument warnings Sep 6, 2015
coverage fix a typo [ci skip] Sep 12, 2014
cygwin Remove -jN option Jun 26, 2016
defs gmake.mk: update timestamp of des_tables.c Jun 4, 2016
doc methods.rdoc: closing tag May 21, 2016
enc case-folding.rb: define version numbers Jun 30, 2016
ext Magic numbers Jun 30, 2016
gems * gems/bundled_gems: Update latest releases, power_assert-0.3.0, May 28, 2016
include RUBY_USE_SETJMPEX Jun 20, 2016
lib Octal mode in un.rb Jun 28, 2016
man fix output in EXAMPLES [ci skip] Feb 18, 2016
misc ruby-additional.el: adjust heredoc line number Jun 7, 2016
missing Use LONG_LONG Jun 29, 2016
nacl Fix PNaCl configure/link errors. Oct 22, 2014
sample * common.mk: test-sample was changed to test-basic. Jan 16, 2016
spec default.mspec: OBJDIR Apr 21, 2016
template Remove -jN option Jun 26, 2016
test * regcomp.c (noname_disable_map): don't optimize out group 0 Jul 1, 2016
tool Unicode Version in RbConfig Jun 14, 2016
win32 VC6 error Jun 29, 2016
.document * .document: removed needless entries. Mar 25, 2015
.editorconfig .editorconfig: new Sep 15, 2012
.gdbinit * .gdbinit (rb_ps_thread): show the detail of cfunc in ruby level Jul 1, 2016
.gitattributes add .gitattributes Nov 19, 2015
.gitignore ruby-runner.h Apr 14, 2016
.indent.pro * .indent.pro: added for ruby-style. Mar 11, 2010
.travis.yml ruby 2.0.0 has ended Mar 8, 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 * ChangeLog: Remove trailing-whitespaces. May 11, 2016
COPYING.ja Change encoding from EUC-JP to UTF-8. [Feature #5128] Sep 4, 2011
ChangeLog * regcomp.c (noname_disable_map): don't optimize out group 0 Jul 1, 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: Added filenames and copyrights for some files in Jun 21, 2016
Makefile.in Makefile.in: un-runnable Jun 9, 2016
NEWS update description about rb_cFixnum and rb_cBignum. Jun 20, 2016
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.md: fix linked file name [ci skip] Feb 26, 2016
README.md README.md: fix linked file name [ci skip] Feb 26, 2016
acinclude.m4 acinclude.m4: rename Jan 3, 2016
aclocal.m4 aclocal.m4: add Jan 3, 2016
addr2line.c * addr2line.c: drop to support ATARI ST platform. It was discontinued May 28, 2016
addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite Mar 26, 2014
appveyor.yml appveyor.yml: fix file names Jun 7, 2016
array.c * array.c (rb_ary_fill): suppress warnings: 'item' may be used May 23, 2016
bignum.c * bignum.c (rb_big2ulong): the old logic seems to try to avoid Jun 28, 2016
class.c prevent rb_cObject from GC Jun 16, 2016
common.mk Move unicode tables timestamp Jun 30, 2016
compar.c * compar.c: Update doc for == [#7688] [ci-skip] Dec 15, 2015
compile.c Coverage on non-positive lines Jun 26, 2016
complex.c ruby.h: RB_INTEGER_TYPE_P May 18, 2016
configure.in RUBY_USE_SETJMPEX Jun 20, 2016
constant.h use id_table for constant tables Dec 29, 2015
cont.c * cont.c, hash.c, random.c, win32/win32.c: cleanup some Win9x/ME/NT4 May 1, 2016
debug.c ruby.h: add prefix Sep 13, 2015
dir.c Name USE_NAME_ON_FS constants Jun 20, 2016
dln.c dln.c: move error message definition Apr 7, 2016
dln.h dln.c: extra arguments Jun 30, 2013
dln_find.c dln_find.c: MAXPATHLEN is not used already Jun 2, 2016
dmydln.c * configure.in: add -Wsuggest-attribute=noreturn and suppress warnings. May 8, 2016
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 * encoding.c: Fix return value of `Encoding::ISO8859_1.name` Apr 25, 2016
enum.c exclude non-VALUE in memo from GC May 20, 2016
enumerator.c enumerator.c: use ALLOCV Dec 15, 2015
error.c [Feature #12005] Unify Fixnum and Bignum into Integer May 17, 2016
eval.c use TH_JUMP_TAG May 5, 2016
eval_error.c Thread.report_on_exception Jun 6, 2016
eval_intern.h Suppress false warnings Jun 18, 2016
eval_jump.c eval_jump.c: restore previous error info Apr 22, 2016
file.c file.c: normalize cwd Jun 12, 2016
gc.c include/ruby/defines.h (GCC_VERSION_SINCE): moved from internal.h May 12, 2016
gc.h * gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj) Oct 6, 2015
gem_prelude.rb Reduce system calls by activating the `did_you_mean` gem. Feb 25, 2016
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 hash.c: ensure NUL-terminated for ENV Jun 10, 2016
ia64.s * removed trailing spaces. Jun 9, 2012
id_table.c capa should be even number on 64-bit SPARC for 8-byte word alignment May 20, 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 * insns.def (opt_succ): optimize like r55515. (but this argument is Jun 29, 2016
internal.h Integer unification macro Jun 13, 2016
io.c * addr2line.c: drop to support ATARI ST platform. It was discontinued May 28, 2016
iseq.c * iseq.h (struct iseq_compile_data): use struct rb_id_table May 14, 2016
iseq.h * iseq.h (struct iseq_compile_data): use struct rb_id_table May 14, 2016
lex.c.blt parse.y: symbol literals for alias/undef Mar 16, 2016
load.c use TH_JUMP_TAG May 5, 2016
loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h Jun 17, 2013
localeinit.c * remove trailing spaces. Jun 19, 2016
main.c * include/ruby/debug.h: introdudced. Nov 20, 2012
marshal.c remove SIGN_EXTEND_CHAR macro Mar 23, 2016
math.c * configure.in (rb_cv_lgamma_r_pm0): check if lgamma_r(+0.0) Apr 27, 2016
method.h * method.h: introduce the folliwing field and macros. Nov 18, 2015
miniinit.c miniinit.c: built-in encoding aliases Dec 26, 2015
node.c node.c: mark u3 of NODE_MATCH2 Mar 21, 2016
node.h * compile.c: fix typos. Dec 14, 2015
numeric.c numeric.c: fix doc of Integer#digits [ci skip] Jun 14, 2016
object.c Fix typo [ci skip] Jun 28, 2016
pack.c internal.h: ONLY_FOR_INTERNAL_USE Apr 27, 2016
parse.y Coverage on non-positive lines Jun 26, 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 Passed block symbol to proc Jun 28, 2016
process.c process.c: [DOC] Process.abort [ci skip] May 27, 2016
random.c VC6 error Jun 29, 2016
range.c * range.c (range_eqq): revert r11113 because rb_call_super() is Jan 23, 2016
rational.c ruby.h: RB_INTEGER_TYPE_P May 18, 2016
re.c * re.c (unescape_nonascii): scan hex up to only 3 characters. May 25, 2016
regcomp.c * regcomp.c (noname_disable_map): don't optimize out group 0 Jul 1, 2016
regenc.c * string.c: New static function rb_str_ascii_casemap; special-casing Jun 8, 2016
regenc.h * string.c: New static function rb_str_ascii_casemap; special-casing Jun 8, 2016
regerror.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09. Jul 16, 2014
regexec.c * regexec.c (ONIGENC_IS_MBC_ASCII_WORD): redefine optimized one. May 29, 2016
regint.h revert UNALIGNED_WORD_ACCESS for GCC6 Apr 30, 2016
regparse.c * regparse.c (fetch_token_in_cc): raise error if given octal escaped May 25, 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-runner.c ruby-runner.h Apr 14, 2016
ruby.c ruby.c: refix r55260 Jun 3, 2016
ruby_assert.h fix build with VM_CHECK_MODE > 0 Jan 25, 2016
ruby_atomic.h Revert r52995 Dec 9, 2015
safe.c * safe.c: removed needless doc related $SAFE=2 Jun 18, 2015
signal.c use TH_JUMP_TAG May 5, 2016
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 ruby.h: RB_INTEGER_TYPE_P May 18, 2016
st.c * configure.in: check function attirbute const and pure, May 8, 2016
strftime.c strftime.c: limit result size Jun 14, 2016
string.c * string.c: Partially reverts r55547 and r55555. Jul 1, 2016
struct.c struct.c: unique members Apr 16, 2016
symbol.c * symbol.c (is_identchar): use ISDIGIT instead of rb_enc_isalnum. May 26, 2016
symbol.h Use HAVE_BUILTIN___BUILTIN_CONSTANT_P May 20, 2016
thread.c thread.c: fix thread_id formatting Jun 15, 2016
thread_pthread.c thread_pthread.c: no fork, no gvl_atfork May 20, 2016
thread_pthread.h * thread_pthread.c (register_ubf_list): renamed from Nov 30, 2015
thread_sync.c thread.c: clear atfork functions May 9, 2016
thread_win32.c thread.c: clear atfork functions May 9, 2016
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. May 14, 2014
time.c * time.c: define _DEFAULT_SOURCE because glibc 2.20 depracates Apr 27, 2016
timev.h configure.in, win32/Makefile.sub: PACKED_STRUCT with VC Feb 25, 2014
transcode.c transcode.c: scrub in the given encoding May 27, 2016
transcode_data.h transcode_data.h: missing cast Aug 8, 2015
util.c util.c: qsort_s May 11, 2016
variable.c variable.c: consider length Jun 19, 2016
version.c version.c: no exit in ruby_show_copyright Jan 7, 2016
version.h * 2016-07-02 Jul 1, 2016
vm.c * vm.c (invoke_bmethod, invoke_block_from_c_0): revert r52104 Jun 20, 2016
vm_args.c vm_core.h: rb_exc_set_backtrace declaration May 29, 2016
vm_backtrace.c use TH_JUMP_TAG May 5, 2016
vm_core.h Thread.report_on_exception Jun 6, 2016
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} Apr 5, 2013
vm_dump.c * vm_dump.c (rb_print_backtrace): our addr2line doesn't work on sparc. Oct 27, 2015
vm_eval.c Suppress false warnings Jun 18, 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 vm_insnhelper.c: check symbol proc to throw Jun 6, 2016
vm_insnhelper.h NoMethodError#private_call? Feb 28, 2016
vm_method.c No respond_to? as if the default definition Jun 24, 2016
vm_opts.h iseq.h: rename member Nov 25, 2015
vm_trace.c use TH_JUMP_TAG May 5, 2016
vsnprintf.c Suppress false warnings Jun 18, 2016

README.md

Build Status Build status

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 to 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 the following directories and install files into 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

Something went wrong with that request. Please try again.