Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The Ruby Programming Language
branch: trunk

* 2015-01-02

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
latest commit 31d24fae56
svn authored
Failed to load latest commit information.
benchmark struct: avoid all O(n) behavior on access
bin erb: suppress warnings
bootstraptest normalize reference to Timeout::Error
ccan ccan/container_of: add container_of_or_null
coverage fix a typo [ci skip]
cygwin GNUmakefile.in: append resources always
defs id.def: move IDs for exception
doc * doc/regexp.rdoc: fix regexp docs for whitespace character.
enc Update dependencies.
ext fiddle: append libffi config.log
gems * gems/bundled_gems: Upgrade to test-unit 3.0.8. assert_throw and
include ruby/version.h: bump API version
lib [DOC]
man GC documentation update
misc ruby-additional.el: change key
missing missing/setproctitle.c: Avoid invalidating argv[1], argv[2], etc. unt…
nacl Fix PNaCl configure/link errors.
sample fix a typo in comment [ci skip]
spec * remove trailing spaces.
template configure.in: fix --with-ruby-version [ci skip]
test test_rubyoptions.rb: locale name
tool rbinstall.rb: fix bundled gems location
win32 never-NULL pointer check
.document * .document: Removed extra space
.editorconfig .editorconfig: new
.gdbinit .gdbinit: update for r47913
.gitignore fiddle: extlibs
.indent.pro * .indent.pro: added for ruby-style.
.travis.yml .travis.yml: use after_failure
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 * doc/regexp.rdoc: fix regexp docs for whitespace character.
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: added license infomation of ccan files.
Makefile.in * Makefile.in, common.mk: move common-srcs to Makefile.in because
NEWS old ChangeLog and NEWS move to doc
README.EXT README.EXT: fix typo
README.EXT.ja ruby.h: export keyword argument functions
README.ja.md * README.md, README.ja.md: removed (wrong) mode setting for emacs.
README.md * README.md: fix slight grammatical error by @abwinkler999.
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: decoration
bignum.c * internal.h: Include ruby.h and ruby/encoding.h to be
class.c * class.c (class_alloc): Strat from age == 2.
common.mk * common.mk (up): propagate verbose option.
compar.c compar.c: use Module#to_s
compile.c fix printf format conversion specifiers
complex.c * internal.h: Gather declarations in non-header files.
configure.in configure.in: default excluded libraries
constant.h constant.h: constant visibilities
cont.c * vm_core.h: introduce new field
debug.c rb_id2str over rb_id2name
dir.c never-NULL pointer check
dln.c Merges a patch form naclports.
dln.h dln.c: extra arguments
dln_find.c dln_find.c: PATH_SEP
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
encoding.c encoding.c: load by rb_require_internal
enum.c [DOC]
enumerator.c use 0 for reserved
error.c ruby.h: parent in rb_data_type_t
eval.c thread.c: get rid of invalid ID symbol
eval_error.c * eval_error.c (error_print): respect the encoding of the message.
eval_intern.h eval_error.c: rb_print_inaccessible
eval_jump.c eval_intern.h: VAR_INITIALIZED
file.c file.c: drop ignored chars
gc.c * gc.c (wmap_final_func): fix memory size shortage when realloc wmap.
gc.h * gc.c: rename is_dying_object() to is_garbage_object().
gem_prelude.rb * ruby.c (process_options): revert r30549.
golf_prelude.rb * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
goruby.c goruby.c: suppress warning
hash.c * hash.c (rb_hash_delete): return Qnil if there are no corresponding
ia64.s * removed trailing spaces.
inits.c * internal.h: Include ruby.h and ruby/encoding.h to be
insns.def insns.def (opt_succ): remove Time#succ optimization
internal.h * hash.c (rb_hash_delete): return Qnil if there are no corresponding
io.c io.c: workaround for YARD doc
iseq.c compile.c: struct accessors
iseq.h mostly fix rb_iseq_load
lex.c.blt * defs/keywords (reserved_word): made inline function static.
load.c load.c: reset errinfo
loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
localeinit.c * internal.h: Include ruby.h and ruby/encoding.h to be
main.c * include/ruby/debug.h: introdudced.
marshal.c marshal.c: append at once
math.c * internal.h: Include ruby.h and ruby/encoding.h to be
method.h gc.c (rb_free_m_tbl): mark function as static
miniinit.c ext/rbconfig/sizeof: move to an extension library
node.c * st.c (numberof): unused. internal.h has same macro.
node.h * Avoid undefined behaviors found by gcc -fsanitize=undefined.
numeric.c * internal.h: Gather declarations in non-header files.
object.c object.c: [DOC] Revise documentation
pack.c * internal.h: Include ruby.h and ruby/encoding.h to be
parse.y parse.y: disable past scope warnings
prelude.rb * prelude.rb: [DOC] Update Thread::exclusive docs by @stevenharman.
probes.d vm_method.c: add new ruby::method-cache-clear dtrace probe
probes_helper.h probes_helper.h (RUBY_DTRACE_HOOK): correct type for _id
proc.c use 0 for reserved
process.c process.c: missing parenthesis
random.c use 0 for reserved
range.c * internal.h: Include ruby.h and ruby/encoding.h to be
rational.c * internal.h: Include ruby.h and ruby/encoding.h to be
re.c re.c: append excape sequence as-is
regcomp.c * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544
regenc.c * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544
regenc.h regenc.h: shrink PosixBracketEntryType
regerror.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
regexec.c uninitialized variable
regint.h * Avoid undefined behaviors found by gcc -fsanitize=undefined.
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 ruby.c: do not modify shared string
ruby_atomic.h ruby_atomic.h (ATOMIC_OR): should return previous value
safe.c safe.c: preserve encoding
signal.c signal.c: fix received_signal
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 * internal.h: Gather declarations in non-header files.
st.c * internal.h: Include ruby.h and ruby/encoding.h to be
strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range.
string.c string.c: fix coderange for non-endianness string
struct.c iseq.c: struct accessors
symbol.c symbol.c: fix memory leak from global fstr hash
symbol.h symbol.c: symbol type predicate functions
thread.c thread.c: fix dynamic symbol keys
thread_pthread.c * thread_pthread.c (native_set_thread_name): New function to
thread_pthread.h thread_pthread: prefer rb_nativethread* types/functions
thread_win32.c * thread_pthread.c (native_set_thread_name): New function to
thread_win32.h * ext/openssl/depend: remove dependency from internal headers.
time.c use 0 for reserved
timev.h configure.in, win32/Makefile.sub: PACKED_STRUCT with VC
transcode.c use 0 for reserved
transcode_data.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
util.c * internal.h: Include ruby.h and ruby/encoding.h to be
variable.c use 0 for reserved
version.c version.c: show malloc_conf
version.h * 2015-01-02
vm.c vm.c: constify
vm_args.c vm_args.c: fix non-symbol keys hash
vm_backtrace.c use 0 for reserved
vm_core.h vm_core.h: preserve thread ordering
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
vm_dump.c * internal.h: Include ruby.h and ruby/encoding.h to be
vm_eval.c vm_eval.c: fix `rb_eval_string_wrap` rdoc
vm_exec.c * vm_exec.c: improve performance in ppc64 arch.
vm_exec.h * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
vm_insnhelper.c vm.c: constify
vm_insnhelper.h vm_core.h: redefined_flag in rb_vm_t
vm_method.c vm_method.c: preserve encodings
vm_opts.h fix minor code comment typos
vm_trace.c vm_trace.c: defer interrupts while postponed jobs
vsnprintf.c ruby.h: add mark to PRIsVALUE

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(ex. class, method calls)
  • Advanced Object-Oriented features(ex. Mix-in, Singleton-method)
  • Operator Overloading
  • Exception Handling
  • Iterators and Closures
  • Garbage Collection
  • Dynamic Loading of Object files(on some architecture)
  • 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 in 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 and 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}/${PLATFOR M}
    • ${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}/${P LATFORM}
    • ${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

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.