Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The Ruby Programming Language

branch: trunk

* properties.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
latest commit a72bf51b07
Nobuyoshi Nakada nobu authored April 21, 2014
Octocat-spinner-32 benchmark st.c: use power-of-two sizes to avoid slow modulo ops March 22, 2014
Octocat-spinner-32 bin * NEWS (with all sufficient information): October 11, 2013
Octocat-spinner-32 bootstraptest FreeBSD 10 SEGVs this less than 4M + 12K bytes. January 15, 2014
Octocat-spinner-32 cygwin * cygwin/GNUmakefile.in (uncommon.mk): link *.res.o. November 05, 2012
Octocat-spinner-32 defs defs/gmake.mk: no _FORTIFY_SOURCE unless optimization March 25, 2014
Octocat-spinner-32 doc * doc/syntax/assignment.rdoc: [DOC] Fix typo unclosed HTML tag by @an… April 02, 2014
Octocat-spinner-32 enc unused functions and variables March 17, 2014
Octocat-spinner-32 ext * ext/-test-/string/coderange.c: add Bug::String.new#coderange_scan April 21, 2014
Octocat-spinner-32 include * internal.h (struct RBignum): Use size_t for len. April 19, 2014
Octocat-spinner-32 lib mkmf.rb: prefer $LIBPATH than $DEFLIBPATH April 19, 2014
Octocat-spinner-32 man ruby.c: remove mangled_path April 16, 2014
Octocat-spinner-32 misc rdoc-mode.el: fill indented block March 14, 2014
Octocat-spinner-32 missing fix typos. Patch by k_takata. May 19, 2013
Octocat-spinner-32 nacl fix typos. Patch by k_takata. May 19, 2013
Octocat-spinner-32 sample * remove trailing spaces, append newline at EOF. December 25, 2013
Octocat-spinner-32 spec * spec/default.mspec: expand relative path for ruby_exe which uses April 16, 2012
Octocat-spinner-32 symbian Added HAVE_LABS and HAVE_LLABS to config.h November 13, 2010
Octocat-spinner-32 template * template/opt_sc.inc.tmpl: [DOC] Fix typo in comment by @imasahiro [… April 17, 2014
Octocat-spinner-32 test * ext/-test-/string/coderange.c: add Bug::String.new#coderange_scan April 21, 2014
Octocat-spinner-32 tool fix the example of failed URI April 01, 2014
Octocat-spinner-32 win32 win32.c: CharNextExA with cp April 16, 2014
Octocat-spinner-32 .document * .document: Removed extra space January 16, 2013
Octocat-spinner-32 .editorconfig .editorconfig: new September 15, 2012
Octocat-spinner-32 .gdbinit .gdbinit (rp): dump T_SYMBOL March 28, 2014
Octocat-spinner-32 .gitignore .gitignore: ignore benchmark files February 22, 2014
Octocat-spinner-32 .indent.pro * .indent.pro: added for ruby-style. March 11, 2010
Octocat-spinner-32 .travis.yml * .travis.yml: Rebuild Travis CI's "ruby-head" version on successful October 07, 2013
Octocat-spinner-32 BSDL * BSDL: update copyright notice for 2013. February 09, 2013
Octocat-spinner-32 COPYING * COPYING: change Ruby's License from a dual license with GPLv2 September 15, 2010
Octocat-spinner-32 COPYING.ja Change encoding from EUC-JP to UTF-8. [Feature #5128] September 04, 2011
Octocat-spinner-32 ChangeLog * string.c (rb_str_coderange_scan_restartable): coderange is always April 21, 2014
Octocat-spinner-32 GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328] June 03, 2012
Octocat-spinner-32 KNOWNBUGS.rb * test/ruby/test_method.rb (test_unlinked_method_entry_in_method_obje… March 25, 2013
Octocat-spinner-32 LEGAL * remove trailing spaces. April 02, 2014
Octocat-spinner-32 Makefile.in * common.mk: Unused target, $(MKMAIN_CMD), removed. April 13, 2014
Octocat-spinner-32 NEWS fix typo April 18, 2014
Octocat-spinner-32 README.EXT fix typo April 18, 2014
Octocat-spinner-32 README.EXT.ja README.EXT: about string termination April 18, 2014
Octocat-spinner-32 README.ja.md * README.md, README.ja.md: removed (wrong) mode setting for emacs. February 24, 2014
Octocat-spinner-32 README.md * README.md, README.ja.md: removed (wrong) mode setting for emacs. February 24, 2014
Octocat-spinner-32 addr2line.c * addr2line.c (fill_lines): get base addrs in fill_lines to use it April 14, 2014
Octocat-spinner-32 addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite March 26, 2014
Octocat-spinner-32 array.c * array.c (ARY_SET): added. April 11, 2014
Octocat-spinner-32 bignum.c * internal.h (struct RBignum): Use size_t for len. April 19, 2014
Octocat-spinner-32 class.c class.c: check for malloc failures March 09, 2014
Octocat-spinner-32 common.mk * common.mk: Unused target, $(MKMAIN_CMD), removed. April 13, 2014
Octocat-spinner-32 compar.c * compar.c (cmp_equal): warn for this release and still rescue January 18, 2014
Octocat-spinner-32 compile.c compile.c: use correct key for block when loading serialized iseqs January 27, 2014
Octocat-spinner-32 complex.c * complax.c: [DOC] Document number conversion of `nil` by @skade [fix G… March 21, 2014
Octocat-spinner-32 configure.in configure.in: rb_cv_getcwd_malloc April 17, 2014
Octocat-spinner-32 constant.h constant.h: reduce rb_const_entry_t size on 64-bit February 06, 2014
Octocat-spinner-32 cont.c eval_intern.h: VAR_INITIALIZED April 04, 2014
Octocat-spinner-32 debug.c * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED. November 04, 2013
Octocat-spinner-32 dir.c dir.c (dir_s_glob): RB_GC_GUARD instead of volatile February 16, 2014
Octocat-spinner-32 dln.c dln.c: non-ascii path on Windows April 05, 2014
Octocat-spinner-32 dln.h dln.c: extra arguments June 30, 2013
Octocat-spinner-32 dln_find.c dln_find.c: PATH_SEP April 16, 2014
Octocat-spinner-32 dmydln.c * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control April 13, 2012
Octocat-spinner-32 dmyext.c no K&R style May 19, 2012
Octocat-spinner-32 encoding.c encoding.c: fix rdoc of `__FILE__` April 09, 2014
Octocat-spinner-32 enum.c enum.c: fix condition to recycle block argument April 16, 2014
Octocat-spinner-32 enumerator.c * enumerator.c (enumerator_block_call): use PARRAY_CONST_PTR() March 17, 2014
Octocat-spinner-32 error.c error.c: Crash Report log February 12, 2014
Octocat-spinner-32 eval.c * include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance): March 20, 2014
Octocat-spinner-32 eval_error.c * eval_error.c (warn_printf): use rb_vsprintf instead so ruby specific June 24, 2013
Octocat-spinner-32 eval_intern.h eval_intern.h: VAR_INITIALIZED April 04, 2014
Octocat-spinner-32 eval_jump.c eval_intern.h: VAR_INITIALIZED April 04, 2014
Octocat-spinner-32 file.c * file.c: [DOC] Add more documentation for File.basename by @avdi [fix February 28, 2014
Octocat-spinner-32 gc.c gc.c: fixnum GC stress April 21, 2014
Octocat-spinner-32 gc.h * gc.c, gc.h (rb_objspace_each_objects_without_setup): April 02, 2014
Octocat-spinner-32 gem_prelude.rb * ruby.c (process_options): revert r30549. January 17, 2011
Octocat-spinner-32 golf_prelude.rb * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425] November 07, 2013
Octocat-spinner-32 goruby.c * goruby.c (init_golf): append suffix. October 28, 2013
Octocat-spinner-32 hash.c hash.c: use ID_SCOPE_SHIFT March 23, 2014
Octocat-spinner-32 ia64.s * removed trailing spaces. June 09, 2012
Octocat-spinner-32 inits.c ext/rbconfig/sizeof: move to an extension library November 18, 2013
Octocat-spinner-32 insns.def insns.def (opt_regexpmatch2): respect redefined match op March 11, 2014
Octocat-spinner-32 internal.h * internal.h (struct RBignum): Use size_t for len. April 19, 2014
Octocat-spinner-32 io.c process.c: constify March 17, 2014
Octocat-spinner-32 iseq.c iseq.c: linear search January 12, 2014
Octocat-spinner-32 iseq.h * include/ruby/ruby.h (struct rb_data_type_struct), gc.c: add June 19, 2013
Octocat-spinner-32 lex.c.blt * defs/keywords (reserved_word): made inline function static. May 16, 2009
Octocat-spinner-32 load.c * parse.y: support Symbol GC. [ruby-trunk Feature #9634] March 26, 2014
Octocat-spinner-32 loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h June 17, 2013
Octocat-spinner-32 localeinit.c localeinit.c: cp on cygwin January 25, 2014
Octocat-spinner-32 main.c * include/ruby/debug.h: introdudced. November 20, 2012
Octocat-spinner-32 marshal.c * internal.h (struct RBignum): Use size_t for len. April 19, 2014
Octocat-spinner-32 math.c * internal.h: Rename macro names: RBIGNUM_FOO to BIGNUM_FOO. February 15, 2014
Octocat-spinner-32 method.h * method.h: rearrange rb_method_definition_struct to save 8 bytes in January 23, 2014
Octocat-spinner-32 miniinit.c ext/rbconfig/sizeof: move to an extension library November 18, 2013
Octocat-spinner-32 node.c * include/ruby/util.h: removed extra semicolon in definition of November 21, 2012
Octocat-spinner-32 node.h * node.h: catch up comments for last commit. November 04, 2013
Octocat-spinner-32 numeric.c * numeric.c (rb_num2long): Returns a long. April 18, 2014
Octocat-spinner-32 object.c object.c: rb_class_search_ancestor April 14, 2014
Octocat-spinner-32 pack.c pack.c: hide associated objects February 05, 2014
Octocat-spinner-32 parse.y parse.y: allow parenthesed do-block in cmdarg April 19, 2014
Octocat-spinner-32 prelude.rb * prelude.rb: [DOC] Update Thread::exclusive docs by @stevenharman. April 17, 2014
Octocat-spinner-32 probes.d vm_method.c: add new ruby::method-cache-clear dtrace probe December 09, 2013
Octocat-spinner-32 probes_helper.h probes_helper.h (RUBY_DTRACE_HOOK): correct type for _id February 15, 2014
Octocat-spinner-32 proc.c proc.c: use already included ancestor iclass April 14, 2014
Octocat-spinner-32 process.c * process.c (OBJ2UID1): Defined even if getpwnam_r is not usable. April 09, 2014
Octocat-spinner-32 random.c * internal.h: Rename macro names: RBIGNUM_FOO to BIGNUM_FOO. February 15, 2014
Octocat-spinner-32 range.c range.c: unused function March 14, 2014
Octocat-spinner-32 rational.c * internal.h (struct RBignum): Use size_t for len. April 19, 2014
Octocat-spinner-32 re.c string.c: infect match result March 28, 2014
Octocat-spinner-32 regcomp.c * regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161. July 04, 2013
Octocat-spinner-32 regenc.c Revert r41786 "broken utf-8" July 09, 2013
Octocat-spinner-32 regenc.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} April 05, 2013
Octocat-spinner-32 regerror.c * regcomp.c: Merge Onigmo 3d855b3. March 21, 2012
Octocat-spinner-32 regexec.c * Merge Onigmo 5.13.4 f22cf2e. April 13, 2013
Octocat-spinner-32 regint.h * Merge Onigmo 5.13.4 f22cf2e. April 13, 2013
Octocat-spinner-32 regparse.c * Merge Onigmo 5.13.4 f22cf2e. April 13, 2013
Octocat-spinner-32 regparse.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} April 05, 2013
Octocat-spinner-32 regsyntax.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820] February 17, 2012
Octocat-spinner-32 ruby.c ruby.c: drop older cygwin April 17, 2014
Octocat-spinner-32 ruby_atomic.h iseq.c: potential memory leak January 12, 2014
Octocat-spinner-32 safe.c * include/ruby/intern.h, February 14, 2014
Octocat-spinner-32 signal.c * signal.c (check_stack_overflow): Don't use ucontext_t if ucontext.h April 09, 2014
Octocat-spinner-32 siphash.c siphash.c: fix missing condition November 30, 2013
Octocat-spinner-32 siphash.h * siphash.h: check configure macros before include newer headers. November 09, 2012
Octocat-spinner-32 sparc.c * sparc.c: Use __asm__ instead of asm for gcc. April 27, 2013
Octocat-spinner-32 sprintf.c * parse.y: support Symbol GC. [ruby-trunk Feature #9634] March 26, 2014
Octocat-spinner-32 st.c * st.c (st_foreach_check): chnage start point of search at check April 20, 2014
Octocat-spinner-32 strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range. April 06, 2013
Octocat-spinner-32 string.c * string.c (rb_str_coderange_scan_restartable): coderange is always April 21, 2014
Octocat-spinner-32 struct.c struct.c: avoid pinning down March 28, 2014
Octocat-spinner-32 thread.c * parse.y: support Symbol GC. [ruby-trunk Feature #9634] March 26, 2014
Octocat-spinner-32 thread_native.h * thread_native.h: add rb_nativethread_self() which returns July 23, 2013
Octocat-spinner-32 thread_pthread.c configure.in: define SET_THREAD_NAME February 27, 2014
Octocat-spinner-32 thread_pthread.h * thread_(pthread|win32).h: rename rb_thread_cond_t to July 23, 2013
Octocat-spinner-32 thread_win32.c vm_core.h: rb_thread_struct::machine January 28, 2014
Octocat-spinner-32 thread_win32.h * thread_(pthread|win32).h: rename rb_thread_cond_t to July 23, 2013
Octocat-spinner-32 time.c time.c: fix non-terminated string April 18, 2014
Octocat-spinner-32 timev.h configure.in, win32/Makefile.sub: PACKED_STRUCT with VC February 25, 2014
Octocat-spinner-32 transcode.c * transcode.c (str_transcode0): don't scrub invalid chars if November 22, 2013
Octocat-spinner-32 transcode_data.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} April 05, 2013
Octocat-spinner-32 util.c util.c: let getcwd allocate buffer April 16, 2014
Octocat-spinner-32 variable.c variable.c, vm_method.c: pin down March 31, 2014
Octocat-spinner-32 version.c version.c: EXIT_SUCCESS November 28, 2013
Octocat-spinner-32 version.h * 2014-04-21 April 21, 2014
Octocat-spinner-32 vm.c vm.c: avoid inadvertent pin-down March 31, 2014
Octocat-spinner-32 vm_backtrace.c vm_backtrace.c: initialize flag January 24, 2014
Octocat-spinner-32 vm_core.h * internal.h, vm_core.h: move LIKELY/UNLIKELY/UNINITIALIZED_VAR() February 05, 2014
Octocat-spinner-32 vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} April 05, 2013
Octocat-spinner-32 vm_dump.c * vm_dump.c (rb_print_backtrace): current implementation March 31, 2014
Octocat-spinner-32 vm_eval.c eval_intern.h: VAR_INITIALIZED April 04, 2014
Octocat-spinner-32 vm_exec.c * vm_exec.c (cfp): Fixes a SEGV issue in r44554. January 14, 2014
Octocat-spinner-32 vm_exec.h * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added. December 18, 2013
Octocat-spinner-32 vm_insnhelper.c proc.c: fix super in bound UnboundMethod April 11, 2014
Octocat-spinner-32 vm_insnhelper.h * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into December 20, 2013
Octocat-spinner-32 vm_method.c variable.c, vm_method.c: pin down March 31, 2014
Octocat-spinner-32 vm_opts.h fix minor code comment typos April 22, 2013
Octocat-spinner-32 vm_trace.c * vm_trace.c: fix typo January 19, 2014
Octocat-spinner-32 vsnprintf.c * vsnprintf.c: remove duplicated def of `UNINITIALIZED_VAR()'. February 05, 2014
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 does 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.