close
The Wayback Machine - https://web.archive.org/web/20140802022539/https://github.com/github/ruby
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: 2.1

This branch is 0 commits ahead and 0 commits behind 2.1

Merge pull request #19 from github/2.1-gc-heap-growth

Backport 2.1 gc heap growth patch
latest commit 71c08a81c0
Dirkjan Bussink dbussink authored
Image benchmark merge revision(s) 44772: [Backport #9430]
Image bin * NEWS (with all sufficient information):
Image bootstraptest merge revision(s) 44601:
Image cygwin * cygwin/GNUmakefile.in (uncommon.mk): link *.res.o.
Image defs * compile.c (iseq_compile_each): emit opt_str_freeze if the #freeze
Image doc * remove trailing spaces.
Image enc add --encoding-compatibility mode to prevent exceptions on operations…
Image ext Merge tag 'v2_1_2' into merge-upstream-2.1.2
Image include use the FL_USER18 bit for RSTRING_HTML_SAFE
Image lib merge revision(s) 44637: [Backport #9385]
Image man * man/ruby.1: [DOC] Use www.ruby-toolbox.com instead of RAA.
Image misc misc/ruby-electric.el: Import version 2.1.1.
Image missing fix typos. Patch by k_takata.
Image nacl fix typos. Patch by k_takata.
Image sample merge revision(s) 44403:
Image script reduce parallel workers
Image spec * spec/default.mspec: expand relative path for ruby_exe which uses
Image symbian Added HAVE_LABS and HAVE_LLABS to config.h
Image template remove const from encoding tables so we can change them at runtime
Image test add more test coverage for [ruby-core:63136] [Bug #9934]
Image tool Merge tag 'v2_1_2' into merge-upstream-2.1.2
Image win32 merge revision(s) 44472: [Backport #9333]
Image .document * .document: Removed extra space
Image .editorconfig .editorconfig: new
Image .gdbinit .gdbinit: initialize
Image .gitignore * .gitignore: ignored *.old files.
Image .indent.pro * .indent.pro: added for ruby-style.
Image .travis.yml * .travis.yml: Rebuild Travis CI's "ruby-head" version on successful
Image BSDL * BSDL: update copyright notice for 2013.
Image COPYING * COPYING: change Ruby's License from a dual license with GPLv2
Image COPYING.ja Change encoding from EUC-JP to UTF-8. [Feature #5128]
Image ChangeLog Cleanup Changelog merge lines
Image GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
Image KNOWNBUGS.rb * test/ruby/test_method.rb (test_unlinked_method_entry_in_method_obje…
Image LEGAL * util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
Image Makefile.in Makefile.in, configure.in: cppflags
Image NEWS * lib/rubygems: RubyGems 2.2.2 which contains the following bug fixes:
Image README * README: Fix typo by Benjamin Winkler [Fixes GH-281]
Image README.EXT merge revision(s) 44374,44375,44376: [Backport #9290]
Image README.EXT.ja merge revision(s) 44377: [Backport #9290]
Image README.ja Fix the mail address of Matz; ruby-lang.jp does not exist.
Image addr2line.c * addr2line.c: Include ELF header after system headers (especially
Image addr2line.h * addr2line.c: use USE_ELF instead of __ELF__ because Solaris
Image array.c merge revision(s) 44512: [Backport #9340]
Image bignum.c * bignum.c (bigxor_int): Apply BIGLO for long in a BDIGIT expression.
Image class.c Merge tag 'v2_1_1' into 2.1
Image common.mk st: pool allocation
Image compar.c compar.c: fail if recursion
Image compile.c Merge tag 'v2_1_1' into 2.1
Image complex.c * complex.c: removed meaningless lines.
Image configure add generated configure for older autoconf machines
Image configure.in Merge tag 'v2_1_2' into merge-upstream-2.1.2
Image constant.h * class.c, include/ruby/ruby.h: add write barriers for T_CLASS,
Image cont.c * thread_pthread.c (rb_thread_create_timer_thread): Show error
Image debug.c * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.
Image dir.c vm_insnhelper.c: rb_get_kwargs
Image dln.c adjust style.
Image dln.h dln.c: extra arguments
Image dln_find.c dln.c: extra arguments
Image dmydln.c * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
Image dmyext.c no K&R style
Image encoding.c Merge tag 'v2_1_1' into 2.1
Image enum.c merge revision(s) 44354: [Backport #9270]
Image enumerator.c enumerator.c: should not store local variable address
Image error.c * error.c: add Exception#backtrace_locations.
Image eval.c merge revision(s) 44628: [Backport #9413]
Image eval_error.c * eval_error.c (warn_printf): use rb_vsprintf instead so ruby specific
Image eval_intern.h * eval_intern.h (SAVE_ROOT_JMPBUF): workaround for the failure of
Image eval_jump.c eval_jump.c: reuse same tag
Image file.c file.c: shrink expanded path
Image gc.c * gc.c: change full GC timing to keep lower memory usage.
Image gc.h * gc.h (rb_objspace_reachable_objects_from_root): added.
Image gem_prelude.rb * ruby.c (process_options): revert r30549.
Image golf_prelude.rb * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
Image goruby.c * goruby.c (init_golf): append suffix.
Image hash.c merge revision(s) 44370: [Backport #9576]
Image ia64.s * removed trailing spaces.
Image inits.c ext/rbconfig/sizeof: move to an extension library
Image insns.def insns.def: adjust style
Image internal.h copy method cache into new singleton class for regular object
Image io.c merge revision(s) 44790: [Backport #9472]
Image iseq.c merge revision(s) 44412,44413,44414,44420,44421: [Backport #9298]
Image iseq.h * include/ruby/ruby.h (struct rb_data_type_struct), gc.c: add
Image lex.c.blt * defs/keywords (reserved_word): made inline function static.
Image load.c * load.c (features_index_add_single): Move loaded_features_index arra…
Image loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
Image localeinit.c localeinit.c: split
Image main.c * include/ruby/debug.h: introdudced.
Image marshal.c * marshal.c: [DOC] Wordsmith marshal.c documentation. by @vipulnsward
Image math.c math.c: fix for Bignum argument
Image method.h * method.h: rearrange rb_method_definition_struct to save 8 bytes in
Image miniinit.c ext/rbconfig/sizeof: move to an extension library
Image node.c * include/ruby/util.h: removed extra semicolon in definition of
Image node.h * node.h: catch up comments for last commit.
Image numeric.c numeric.c: isfinite
Image object.c merge revision(s) 44525,44534,44537: [Backport #9381]
Image pack.c * dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
Image parse.y merge revision(s) 44412,44413,44414,44420,44421: [Backport #9298]
Image pool_alloc.h st: pool allocation
Image pool_alloc.inc.h st: pool allocation
Image prelude.rb * prelude.rb: Moved Mutex#synchronize to
Image probes.d vm_method.c: add new ruby::method-cache-clear dtrace probe
Image probes_helper.h probes_helper.h: RUBY_DTRACE_HOOK
Image proc.c merge revision(s) 44432: [Backport #9299]
Image process.c merge revision(s) 44687,44706,44727: [Backport #8770]
Image random.c * random.c (rand_init): Make it possible to specify arbitrary array
Image range.c merge revision(s) 44549: [Backport #9387]
Image rational.c revertd.
Image re.c add --encoding-compatibility mode to prevent exceptions on operations…
Image regcomp.c * regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.
Image regenc.c Revert r41786 "broken utf-8"
Image regenc.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
Image regerror.c * regcomp.c: Merge Onigmo 3d855b3.
Image regexec.c * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
Image regint.h * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
Image regparse.c * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
Image regparse.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
Image regsyntax.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
Image ruby.c add --encoding-compatibility mode to prevent exceptions on operations…
Image ruby_atomic.h merge revision(s) 44568: [Backport #9399]
Image safe.c safe.c: ruby_safe_level_4_warning
Image signal.c signal.c: fault address
Image siphash.c siphash.c: fix missing condition
Image siphash.h * siphash.h: check configure macros before include newer headers.
Image sparc.c * sparc.c: Use __asm__ instead of asm for gcc.
Image sprintf.c sprintf.c: QUOTE flag
Image st.c st: pool allocation
Image strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range.
Image string.c string.c: consider capacity
Image struct.c merge revision(s) 44501: [Backport #9353]
Image thread.c thread.c: reduce tags and stack
Image thread_native.h * thread_native.h: add rb_nativethread_self() which returns
Image thread_pthread.c merge revision(s) r45190,r45202,r45204,r45713: [Backport #9586]
Image thread_pthread.h * thread_(pthread|win32).h: rename rb_thread_cond_t to
Image thread_win32.c * eval_intern.h (SAVE_ROOT_JMPBUF): workaround for the failure of
Image thread_win32.h * thread_(pthread|win32).h: rename rb_thread_cond_t to
Image time.c * time.c (v2w): Normalize a rational value to an integer if possible.
Image timev.h timev.h: move time_t stuffs
Image transcode.c * transcode.c (str_transcode0): don't scrub invalid chars if
Image transcode_data.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
Image util.c util.c: bump stack size in ruby_qsort()
Image variable.c merge revision(s) r45350: [Backport #9645]
Image version.c version.c: EXIT_SUCCESS
Image version.h Merge tag 'v2_1_2' into merge-upstream-2.1.2
Image vm.c merge revision(s) 44380: [Backport #9296]
Image vm_backtrace.c * error.c: add Exception#backtrace_locations.
Image vm_core.h * compile.c, insns.def, test/ruby/test_rubyvm.rb, vm.c, vm_core.h,
Image vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
Image vm_dump.c vm_dump.c: improve wording of apple crashlog messages
Image vm_eval.c * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
Image vm_exec.c * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
Image vm_exec.h * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
Image vm_insnhelper.c merge revision(s) 44931: [Backport #9452]
Image vm_insnhelper.h * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
Image vm_method.c Merge tag 'v2_1_1' into 2.1
Image vm_opts.h fix minor code comment typos
Image vm_trace.c vm_trace.c: isolate exceptions
Image vsnprintf.c * vsnprintf.c: Fix spelling from compliment to complement.

README

= 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 YourFirstName YourFamilyName
e.g.
        subscribe Joseph Smith

in the mail body (not subject) to the address <mailto:ruby-talk-ctl@ruby-lang.org>.


== How to compile and install

This is what you need to do to compile and install Ruby:

0.   If you want to use Microsoft Visual C++ to compile ruby,
     read win32/README.win32 instead of this document.

1.   If +./configure+ does not exist or is older than configure.in,
     run autoconf to (re)generate configure.

2.   Run +./configure+, which will generate config.h and Makefile.

     Some C compiler flags may be added by default depending on your
     environment.  Specify <tt>optflags=..</tt> and <tt>warnflags=..</tt> as
     necessary to override them.

3.   Edit +defines.h+ if you need. Usually this step will not be needed.

4.   Remove comment mark(<tt>#</tt>) 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 "<tt>#option nodynamic</tt>" in
     +ext/Setup+.

     Usually this step will not be needed.

5.   Run +make+.

6.   Optionally, run '<tt>make check</tt>' to check whether the compiled Ruby
     interpreter works well. If you see the message "<tt>check succeeded</tt>",
     your ruby works as it should (hopefully).

7.   Run '<tt>make install</tt>'

     This command will create following directories and install files
     onto them.

     * <tt>${DESTDIR}${prefix}/bin</tt>
     * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/share/man/man1</tt>
     * <tt>${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system</tt>

     If Ruby's API version is '_x.y.z_', the <tt>${MAJOR}</tt> is '_x_', the
     <tt>${MINOR}</tt> is '_y_', and the <tt>${TEENY}</tt> 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
'<tt>make distclean-ext</tt>' 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.

<mailto:matz@ruby-lang.org>

--
Local variables:
mode: rdoc
end:
Something went wrong with that request. Please try again.