Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The Ruby Programming Language
Ruby C C++ HTML Yacc Makefile Other

test_case.rb: fix multiple load

* lib/rubygems/test_case.rb (teardown): do not delete features
  loaded from the original load paths, the same libraries should
  be loaded again when the same features are required.
  [ruby-dev:49031] [Bug #11222]

git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
latest commit 5c19a5fa24
@nobu nobu authored
Failed to load latest commit information.
benchmark delay `exception: false' checks for minor speedup
bin * bin/erb: $SAFE=3 is obsolete.
bootstraptest * bootstraptest/test_method.rb: remove a test because $SAFE=2 was
ccan ccan/list/list.h: sync with ccan upstream
coverage fix a typo [ci skip]
cygwin stub.o: under win32
defs * ext/json/json.gemspec, lib/rdoc/rdoc.gemspec: added gemspec directly.
doc doc/extension.rdoc: note rb_get_kwargs changes keywords_hash [ci skip]
enc * enc/make_encmake.rb: the list of encoding extension libraries must
ext delay `exception: false' checks for minor speedup
gems * gem/bundled_gems: updated to test-unit 3.1.1 and minitest 5.7.0.
include socket: memoize common socket families in fptr->mode
lib test_case.rb: fix multiple load
man man: updated
misc Import ruby-electric.el version 2.2.3 from upstream
missing missing/setproctitle.c: Avoid invalidating argv[1], argv[2], etc. unt…
nacl Fix PNaCl configure/link errors.
sample * sample/exyacc.rb: Fix some typos.
spec * spec/default.mspec: use default configuration file name.
template sizes.c.tmpl: extract RUBY_DEFINT
test transcode.c: empty encoding name
tool runruby.rb: don't close other fds
win32 file.c: _wfreopen_s on mingw
.document * .document: removed needless entries.
.editorconfig .editorconfig: new
.gdbinit .gdbinit: T_IMEMO
.gitignore add .gitignore rules for Microsoft Visual C++ * added for ruby-style.
.travis.yml * .travis.yml: enabled email notification.
BSDL * BSDL: update copyright notice for 2013. [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 test_case.rb: fix multiple load
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. * (rbconfig.rb): add rule to make.
NEWS class.c: TypeError when superclass mismatch
README.EXT README.EXT: add redirect [ruby-core:68631]
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631] fix markup miss. [ci skip] * tweak styles. [fix GH-945][ci skip] Patch by @bryndyment
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: use ALLOCV_N
bignum.c internal.h: roomof
class.c * method.h: introduce rb_callable_method_entry_t to remove add ccan/list headers as deps for st.c
compar.c compar.c: variable name [ci skip]
compile.c compile.c: use %+PRIsVALUE instead of rb_inspect
complex.c * complex.c (f_complex_polar): simple bug reproduced only when y is io.c: reopen OS encoding path
constant.h constant.h: constant visibilities
cont.c * method.h: introduce rb_callable_method_entry_t to remove
debug.c * debug.c (ruby_debug_print_id): use rb_id2name() for fprintf().
dir.c dir.c: set errno
dln.c dln.c: fix EXTERNAL_PREFIX
dln.h dln.c: extra arguments
dln_find.c dln_find.c: define S_ISREG
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 use rb_funcallv
enum.c * Add test for Enumerable#none? [fix GH-950] Patch by @yui-knk
enumerator.c * internal.h: use T_IMEMO to represent `struct MEMO' value.
error.c error.c: remove singleton method
eval.c * method.h: introduce rb_callable_method_entry_t to remove
eval_error.c * method.h: split rb_method_definition_t::flag to several flags.
eval_intern.h * internal.h: move definition of rb_cref_t to method.h.
eval_jump.c eval.c: use the given thread
file.c * include/ruby/ruby.h: $SAFE=2 is now obsolete.
gc.c * method.h: introduce rb_callable_method_entry_t to remove
gc.h * gc.c (rb_raw_obj_info): separated from rb_obj_info().
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 enum.c (enum_minmax): simplify return value creation
ia64.s * removed trailing spaces.
inits.c * internal.h: Include ruby.h and ruby/encoding.h to be
insns.def * method.h: introduce rb_callable_method_entry_t to remove
internal.h * method.h: introduce rb_callable_method_entry_t to remove
io.c delay `exception: false' checks for minor speedup
iseq.c move RB_GC_GUARD responsibility to rb_add_method_iseq
iseq.h * iseq.c: constify.
lex.c.blt * defs/keywords (reserved_word): made inline function static.
load.c load.c: use RB_GC_GUARD
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 variable.c: avoid compatibility table with generic ivars
math.c * math.c (math_log1, math_log2, math_log10): refactoring
method.h * method.h: introduce rb_callable_method_entry_t to remove
miniinit.c miniinit.c: minimum built-in encodings in miniruby
node.c * vm_insnhelper.c: use T_IMEMO to create SVAR.
node.h * internal.h, node.h: move a definition of `struct rb_global_entry'
numeric.c * numeric.c (Numeric#negative?): [DOC] Fix call-seq.
object.c object.c: fix up r51039
pack.c * pack.c (pack_{un,}pack): new template character `j` and `J`, pointer
parse.y * method.h: split rb_method_definition_t::flag to several flags.
prelude.rb * prelude.rb: [DOC] Update Thread::exclusive docs by @stevenharman.
probes.d change lingering dtrace probe documentation from function- to method-
probes_helper.h probes_helper.h (RUBY_DTRACE_HOOK): correct type for _id
proc.c * method.h: introduce rb_callable_method_entry_t to remove
process.c * process.c (rb_execarg_parent_start1): new macro ALWAYS_NEED_ENVP
random.c random.c: refactor
range.c range.c: move String specific code
rational.c * remove trailing spaces.
re.c * re.c: Update documentation for Regexp class.
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: copy initial load path marks
ruby_atomic.h ruby_atomic.h: refine ATOMIC_PTR_CAS
safe.c * safe.c: removed needless doc related $SAFE=2
signal.c * include/ruby/ruby.h: $SAFE=2 is now obsolete.
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: rb_inspect returns a string
st.c * st.c: get rid of VC++'s warnings of C4700 (uninitialized local
strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range.
string.c string.c (rb_str_justify): use RB_GC_GUARD
struct.c struct.c: AREF_HASH_UNIT enum
symbol.c * load.c: removed unused header file "node.h".
symbol.h symbol.c: symbol type predicate functions
thread.c * thread.c (rb_thread_safe_level): fix document. $SAFE=3 is obsolete.
thread_pthread.c * define SET_THREAD_NAME if it has pthread_set_name_np
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 * time.c (time_getlocaltime): [DOC] Add examples of valid utc_offset
timev.h, win32/Makefile.sub: PACKED_STRUCT with VC
transcode.c transcode.c: empty encoding name
transcode_data.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
util.c util.c: fix off-by-one error
variable.c variable.c: remove FL_ABLE check for generic ivars
version.c scan version.c
version.h * 2015-07-04
vm.c vm.c: reduce branches for always-set VM fields
vm_args.c * method.h: introduce rb_callable_method_entry_t to remove
vm_backtrace.c * method.h: introduce rb_callable_method_entry_t to remove
vm_core.h * method.h: introduce rb_callable_method_entry_t to remove
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
vm_dump.c * method.h: introduce rb_callable_method_entry_t to remove
vm_eval.c * remove trailing spaces.
vm_exec.c * vm_exec.c: improve performance in ppc64 arch.
vm_exec.h * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
vm_insnhelper.c * method.h: introduce rb_callable_method_entry_t to remove
vm_insnhelper.h * method.h: split rb_method_definition_t::flag to several flags.
vm_method.c * method.h: introduce rb_callable_method_entry_t to remove
vm_opts.h fix minor code comment typos
vm_trace.c vm_trace.c: unified a_call and a_return
vsnprintf.c sprintf.c: ruby specific functions

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.

How to get Ruby

For a complete list of ways to install Ruby, including using third-party tools like rvm, see:

The Ruby distribution files can be found on the following FTP site:

The trunk of the Ruby source tree can be checked out with the following command:

$ svn co ruby

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

$ git clone git://

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

$ svn ls

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

$ git ls-remote git://

Ruby home page

The URL of the Ruby home page is:

Mailing list

There is a mailing list to talk about Ruby. To subscribe this list, please send the following phrase:


in the mail body (not subject) to the address

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


See the file COPYING.


Questions about the Ruby language can be asked on the Ruby-Talk mailing list ( or on websites like (

Bug reports should be filed at

The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.

Something went wrong with that request. Please try again.