The Wayback Machine - https://web.archive.org/web/20190322164646/https://github.com/github/ruby
Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
The Ruby Programming Language http://www.ruby-lang.org/
Branch: 2.5-github
Clone or download
Pull request Compare This branch is 156 commits ahead, 5363 commits behind ruby:trunk.
tenderlove Merge branch '2.5-github' of github.com:github/ruby into 2.5-github
* '2.5-github' of github.com:github/ruby:
  thread_sync.c (condvar_ptr): reset fork_gen after forking
  thread_sync: redo r62934 to use fork_gen
  variable.c: fix thread + fork errors in autoload
  thread_sync.c: avoid reaching across stacks of dead threads
Latest commit 26978b5 Oct 30, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
basictest
benchmark Lazy Proc allocation for block parameters Oct 24, 2017
bin
bootstraptest merge revision(s) 64860,64861: [Backport #15164] Oct 9, 2018
ccan ccan/list/list.h: suppress unused argument warnings Sep 6, 2015
coverage
cygwin MFLAGS for nmake Feb 10, 2017
defs
doc
enc gperf.sed: static declarations Dec 15, 2017
ext
gems * gems/bundled_gems: Upgrade the did_you_mean gem to 1.2.0 Dec 14, 2017
include merge revision(s) 63571,63572: [Backport #14816] Aug 18, 2018
lib merge revision(s) 62007,62024: [Backport #13069] Oct 9, 2018
man erb.1: add missing option in detailed description Oct 21, 2017
misc
missing Support C89 if possible Dec 18, 2017
sample
spec merge revision(s) 62731,62735: [Backport #14495] Jul 12, 2018
template merge revision(s) 61478: [Backport #14234] Dec 27, 2017
test Merge branch '2.5-github' of github.com:github/ruby into 2.5-github Oct 30, 2018
tool
win32 merge revision(s) 64913: [Backport #15223] Oct 16, 2018
.document
.editorconfig
.gdbinit
.gitattributes rename ruby-runner as bin/ruby Sep 15, 2017
.gitignore .gitignore: ignore dlntest.dll Nov 12, 2017
.indent.pro
.travis.yml
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: expand tabs Feb 18, 2017
COPYING.ja
GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328] Jun 3, 2012
KNOWNBUGS.rb gc.c: expand sorted pages Jun 22, 2017
LEGAL merge revision(s) 62513: [Backport #12762] Feb 24, 2018
Makefile.in
NEWS
README.EXT
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631] Mar 30, 2015
README.ja.md configure.ac Sep 29, 2017
README.md
acinclude.m4 acinclude.m4: rename Jan 3, 2016
aclocal.m4
addr2line.c
addr2line.h
appveyor.yml
array.c
bignum.c merge revision(s) 61517: [Backport #14259] Jan 5, 2018
class.c
common.mk
compar.c
compile.c merge revision(s) 64515: Oct 21, 2018
complex.c merge revision(s) 62107: [Backport #14420] Feb 22, 2018
configure.ac merge revision(s) 61500: [Backport #14248] Jan 3, 2018
constant.h merge revision(s) 62394,62395: [Backport #14469] Mar 15, 2018
cont.c merge revision(s) 64062: [Backport #14939] Oct 11, 2018
debug.c
debug_counter.c debug_counter.c: debug_counter_names [ci skip] Mar 10, 2017
debug_counter.h
dir.c
dln.c get rid of strcpy Dec 26, 2016
dln.h
dln_find.c
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
encindex.h
encoding.c encoding.c: rb_enc_find_index2 Dec 22, 2017
enum.c merge revision(s) 64014: [Backport #14926] Sep 1, 2018
enumerator.c
error.c
eval.c remove `PUSH_TAG`/`EXEC_AG`/`POP_TAG`/`JUMO_TAG`. Dec 6, 2017
eval_error.c
eval_intern.h
eval_jump.c
file.c
gc.c
gc.h remove rb_threadptr_during_gc(). Oct 29, 2017
gem_prelude.rb Reduce system calls by activating the `did_you_mean` gem. Feb 25, 2016
golf_prelude.rb
goruby.c
hash.c merge revision(s) 64860,64861: [Backport #15164] Oct 9, 2018
ia64.s
id_table.c adjust styles [ci skip] May 10, 2017
id_table.h
inits.c
insns.def
internal.h merge revision(s) 61616: [Backport #14314] Feb 16, 2018
io.c merge revision(s) 63304: [Backport #14713] Jul 12, 2018
iseq.c
iseq.h merge revision(s) 64514: [Backport #14702] Oct 11, 2018
lex.c.blt
load.c
loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h Jun 17, 2013
localeinit.c
main.c main.c: RUBY_DEBUG_ENV in devel Jun 30, 2017
marshal.c merge revision(s) 61616: [Backport #14314] Feb 16, 2018
math.c math.c: check argument to lgamma_r May 13, 2017
method.h
miniinit.c
node.c
node.h node.h: add nd_last_loc and nd_set_last_loc Dec 14, 2017
numeric.c
object.c
pack.c merge revision(s) 65125: Oct 17, 2018
parse.y
prelude.rb
probes.d change lingering dtrace probe documentation from function- to method- May 30, 2015
probes_helper.h th->ec: dtrace Nov 7, 2017
proc.c
process.c
random.c random.c: make sure that Random.urandom returns required-length buffer Dec 16, 2017
range.c
rational.c
re.c [DOC] Fix exception class [ci skip] Dec 13, 2017
regcomp.c
regenc.c
regenc.h
regerror.c
regexec.c re-apply r60755 Dec 1, 2017
regint.h
regparse.c Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05. Dec 1, 2017
regparse.h Merge Onigmo 6.1.1 Feb 11, 2017
regsyntax.c Merge Onigmo 6.0.0 Dec 10, 2016
ruby-runner.c ruby-runner.c: RUBYLIB Sep 24, 2017
ruby.c merge revision(s) 64900: [Backport #15190] Oct 9, 2018
ruby_assert.h
ruby_atomic.h Revert r52995 Dec 9, 2015
rubystub.c
safe.c call `rb_vm_stack_to_heap()` Oct 29, 2017
signal.c
siphash.c switch SipHash from SipHash24 to SipHash13 variant Jan 20, 2017
siphash.h switch SipHash from SipHash24 to SipHash13 variant Jan 20, 2017
sparc.c configure.ac Sep 29, 2017
sprintf.c error.c: KeyError#receiver and KeyError#key Sep 18, 2017
st.c merge revision(s) 62396: [Backport #14357] Mar 20, 2018
strftime.c
string.c merge revision(s) 63252: [Backport #14707] Aug 12, 2018
struct.c
symbol.c common conversion functions Oct 26, 2017
symbol.h
thread.c
thread_pthread.c
thread_pthread.h * thread_pthread.c (register_ubf_list): renamed from Nov 30, 2015
thread_sync.c Merge branch '2.5-github' of github.com:github/ruby into 2.5-github Oct 30, 2018
thread_win32.c thread_win32.c: stop returning unused value Nov 16, 2017
thread_win32.h
time.c
timev.h
transcode.c
transcode_data.h
util.c Drop to support NaCl platform. Oct 23, 2017
variable.c
version.c version.c: no exit in ruby_show_copyright Jan 7, 2016
version.h merge revision(s) 64515: Oct 21, 2018
vm.c merge revision(s) 63727: [Backport #14865] Aug 18, 2018
vm_args.c vm_args.c: ec arg of args_setup_kw_parameters Nov 21, 2017
vm_backtrace.c
vm_core.h variable.c: fix thread + fork errors in autoload Jul 24, 2018
vm_debug.h
vm_dump.c vm_dump.c: [DOC] fix grammar Nov 7, 2017
vm_eval.c iseq.c: dump type of branchiftype on disasm Dec 13, 2017
vm_exec.c
vm_exec.h
vm_insnhelper.c merge revision(s) 61766: [Backport #14350] Aug 5, 2018
vm_insnhelper.h remove `trace` instruction. [Feature #14104] Nov 14, 2017
vm_method.c
vm_opts.h
vm_trace.c
vsnprintf.c

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, macOS, Haiku, etc.) cf. https://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:

https://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 https://svn.ruby-lang.org/repos/ruby/trunk/ ruby

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

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

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

$ svn ls https://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:

https://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 mailto: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.ac, 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.

    • On Mac, set RUBY_CODESIGN environment variable with a signing identity. It uses the identity to sign ruby binary. See also codesign(1).
  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. Optionally, run make update-gems and make extract-gems.

    If you want to install bundled gems, run make update-gems and make extract-gems before running make install.

  9. 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 (https://www.ruby-lang.org/en/community/mailing-lists) or on websites like (https://stackoverflow.com).

Bug reports should be filed at https://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.

mailto:matz@ruby-lang.org

You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.