Skip to content
The Ruby Programming Language http://www.ruby-lang.org/
Ruby C HTML Yacc Makefile Emacs Lisp Other
Find file
Latest commit 7e192b2 svn * 2016-02-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Failed to load latest commit information.
basictest * common.mk: test-sample was changed to test-basic.
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
coverage fix a typo [ci skip]
cygwin fix rc files conflict in parallel build
defs * common.mk: test-sample was changed to test-basic.
doc standard_library.rdoc: fix typo [ci skip]
enc * remove trailing spaces.
ext mask upper nibble
gems update bundled gems
include encoding.h: rb_enc_asciicompat_inline
lib ASCII-incompatible escape
man Fix typo [ci skip]
misc ruby-additional.el: ruby-decode-unicode
missing missing.h: remove explicit_bzero_by_memset_s
nacl Fix PNaCl configure/link errors.
sample * common.mk: test-sample was changed to test-basic.
spec * spec/default.mspec: use default configuration file name.
template unicode_norm_gen.tmpl: Remove indicator
test Fix r53748; the datafile includes non ASCII
tool downloader.rb: https setter
win32 win32.c: reuse fullpath buffer
.document * .document: removed needless entries.
.editorconfig .editorconfig: new
.gdbinit .gdbinit: dump_node [ci skip]
.gitattributes add .gitattributes
.gitignore * .gitignore: ignored ISeq binary format.
.indent.pro * .indent.pro: added for ruby-style.
.travis.yml * .travis.yml: removed commented-out code.
BSDL * BSDL: update copyright notice for 2013.
CONTRIBUTING.md [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 * ChangeLog: revive an entry for r53762 accidentally removed at r53764.
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
Makefile.in * Makefile.in (update-rubyspec): fix r53208 like r53451.
NEWS version.c: no exit in ruby_show_copyright
README.EXT README.EXT: add redirect [ruby-core:68631]
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631]
README.ja.md README.ja.md: fix markup miss. [ci skip]
README.md Use SVG Travis badge over PNG
acinclude.m4 acinclude.m4: rename
aclocal.m4 aclocal.m4: add
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
appveyor.yml appveyor.yml: simplify
array.c Fix a Ruby-Doc comment for Array#dig
bignum.c * insns.def (opt_mult): Use int128_t for overflow detection.
class.c resolve class name earlier and more consistently
common.mk * common.mk: Added two more precondition files for enc/unicode/casefo…
compar.c * compar.c: Update doc for == [#7688] [ci-skip]
compile.c fstring early for internal iseq
complex.c RUBY_ASSERT
configure.in Revert "check __int64_t and __int128_t"
constant.h use id_table for constant tables
cont.c fix common misspelling [ci skip]
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 RUBY_ASSERT
enum.c Rename parameter name
enumerator.c enumerator.c: use ALLOCV
error.c RUBY_ASSERT
eval.c eval.c: warn block for using
eval_error.c Use `rb_method_visibility_t` instead of `int` in `rb_print_undef`
eval_intern.h Use `rb_method_visibility_t` instead of `int` in `rb_print_undef`
eval_jump.c eval.c: use the given thread
file.c file.c: fix documentation
gc.c * re.c: Introduce RREGEXP_PTR.
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 hash.c: exception examples
ia64.s * removed trailing spaces.
id_table.c RUBY_ASSERT
id_table.h id_table: const correctness for _size and _memsize
inits.c * random.c (InitVM_Random): move Random::DEFAULT initialization
insns.def improve r53741
internal.h fstring_enc_new
io.c io.c: rb_io_open_generic
iseq.c fstring early for internal iseq
iseq.h * introduce new ISeq binary format serializer/de-serializer
lex.c.blt lex.c.blt: update
load.c * introduce new ISeq binary format serializer/de-serializer
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 (r_object0): honor Marshal.load post proc
math.c object.c: rb_num_to_dbl
method.h * method.h: introduce the folliwing field and macros.
miniinit.c miniinit.c: built-in encoding aliases
node.c node.c: NODE_QCALL
node.h * compile.c: fix typos.
numeric.c * enum.c: fix a typo in documentation.
object.c resolve class name earlier and more consistently
pack.c pack.c: check index range
parse.y * re.c: Introduce RREGEXP_PTR.
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 Use `rb_method_visibility_t` instead of `int` in `rb_print_undef`
process.c * process.c (rb_execarg_parent_start1): need to convert the encoding to
random.c * *.c (*_memsize): do not check ptr.
range.c * range.c (range_eqq): revert r11113 because rb_call_super() is
rational.c RUBY_ASSERT
re.c fstring without copy
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 disable unaligned word access
regparse.c * regparse.c (fetch_name_with_level): allow non word characters
regparse.h regparse.h: ANSI alias rule fix
regsyntax.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
ruby.c ruby.c: EACH_FEATURES
ruby_assert.h fix build with VM_CHECK_MODE > 0
ruby_atomic.h Revert r52995
safe.c * safe.c: removed needless doc related $SAFE=2
signal.c Signal.list deduplicates keys
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: exact number
st.c disable unaligned word access
strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range.
string.c fstring_enc_new
struct.c * array.c: Improve and fix documentation for Array#dig
symbol.c symbol.c: more informative error message
symbol.h symbol.h: unexpected safe call
thread.c thread.c: interrupt queue on uninitialized thread
thread_pthread.c * thread_pthread.c (rb_thread_create_timer_thread): destroy attr even
thread_pthread.h * thread_pthread.c (register_ubf_list): renamed from
thread_sync.c thread_sync.c: [DOC] remove SizedQueue#close argument. [ci skip]
thread_win32.c * thread_pthread.c (register_ubf_list): renamed from
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 configure.in, 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: matched backrefs only
version.c version.c: no exit in ruby_show_copyright
version.h * 2016-02-08
vm.c fstring early for internal iseq
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 fix build with VM_CHECK_MODE > 0
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_eval.c: argument names
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 (vm_check_if_namespace): tiny size reduction
vm_insnhelper.h vm_eval.c: fstring format
vm_method.c * vm_method.c: fix grammar in respond_to? warning.
vm_opts.h iseq.h: rename member
vm_trace.c * enum.c: fix a typo in documentation.
vsnprintf.c * compile.c: fix typos.

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 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

Something went wrong with that request. Please try again.