You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aaron Patterson 1d564acedc
Remove unused constant.
8 hours ago
.github/workflows Remove unreachable step level `[ci skip]` 1 week ago
basictest colors file has been moved from test to tool 3 months ago
benchmark Optimize Array#flatten and flatten! for already flattened arrays (#2495) 2 weeks ago
bin Added binstub for racc executables. 4 months ago
bootstraptest fix memory corruption in old GCC 1 week ago
ccan Fix typos [ci skip] 3 days ago
coroutine Add assertions to `coroutine_initialize_main`. 3 months ago
coverage Fix typo 4 months ago
cygwin MFLAGS for nmake 2 years ago
defs Removed idNUMPARAM_0 3 weeks ago
doc Remove duplicated `.` [ci skip] 2 days ago
enc Init function is need to link statically 2 months ago
ext Remove unused constant. 8 hours ago
gems Update to latest test-unit 2 weeks ago
include Also moved fallback definition of __has_attribute 5 days ago
lib Treat key sequences from getwch() that start from 0 or 0xE0 correctly 11 hours ago
libexec [bundler/bundler] Require relatively from exe/ when possible 2 months ago
man Update the latest documentation of bundler 4 weeks ago
misc fixed inspecting string [ci skip] 1 week ago
missing missing/setproctitle.c: remove nonsense NULL check 5 days ago
sample Fix sample/drb/http0serv.rb 1 month ago
spec Make circular argument reference a SyntaxError instead of a warning 12 hours ago
template Pass $(XRUBY) to test-bundled-gems.rb since RbConfig.ruby is incorrect for miniruby 2 weeks ago
test Look up constant instead of caching in a global 8 hours ago
tool Revert "alias assert_raise_message for compatibility with test-unit" 1 day ago
win32 win32.c: Remove unused calls to StartSockets (#2312) 1 week ago
.dir-locals.el add .dir-locals.el [ci skip] 9 months ago
.document Include LEGAL in .document [ci skip] 10 months ago
.drone.yml Remove arm64 build from Drone 1 day ago
.editorconfig Remove duplicated and change order 7 months ago
.gdbinit Prefix global_symbols with `ruby_` 5 months ago
.gitattributes Add tool/leaked-globals to .gitattributes [ci skip] 3 months ago
.gitignore Only ignore build directories. 3 months ago * added for ruby-style. 9 years ago
.rspec_parallel Introduce test-bundler-parallel task. 1 month ago
.travis.yml Revert "Disable ccache on arm64 build" 1 day ago
BSDL * BSDL: update copyright notice for 2013. 6 years ago [DOC] Please see _the_ official issue tracker... [ci skip] 5 years ago
COPYING COPYING: reformat as RDoc 8 months ago
COPYING.ja COPYING: reformat as RDoc 8 months ago
GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328] 7 years ago
KNOWNBUGS.rb compile.c: fix positions encode 1 year ago
LEGAL Split procstat_vm.c 8 months ago
NEWS [DOC] no change on Windows [Bug #15267] [ci skip] 18 hours ago
README.EXT README.EXT: add redirect [ruby-core:68631] 4 years ago
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631] 4 years ago Add badges of GitHub Actions [ci skip] 4 weeks ago Add badges of GitHub Actions [ci skip] 4 weeks ago
aclocal.m4 check finite,isinf,isnan as macros first 8 months ago
addr2line.c retrieve current path on macOS 1 month ago
addr2line.h Support Mach-O on backtrace with DWARF 1 year ago
appveyor.yml appveyor.yml - msys2 update code 1 month ago
array.c Prefer st_is_member over st_lookup with 0 1 week ago
ast.c Rename NODE_ARRAY to NODE_LIST to reflect its actual use cases 1 month ago
bignum.c Unused LONG_MAX_as_double 1 month ago
class.c Simplify rb_define_module_id 1 week ago Comparable#clamp with a range [Feature #14784] 2 days ago
compar.c Comparable#clamp with a range [Feature #14784] 2 days ago
compile.c Right size the numtable in insn_make_insn_table to VM_INSTRUCTION_SIZE 1 week ago
complex.c Make Kernel#{Pathname,BigDecimal,Complex} return argument if given correct type 3 weeks ago oops 1 month ago
constant.h Module#constant_source_location [Feature #10771] 3 months ago
cont.c Add rb_adjust_argv_kw_splat to internal.h 3 weeks ago
debug.c internal.h: remove dependecy on ruby/io.h 1 year ago
debug_counter.c Fix rb_define_singleton_method warning 3 weeks ago
debug_counter.h add debug counters for vm_search_method_slowpath() 2 weeks ago
dir.c dir.c (join_path_from_pattern): check NULL from malloc 5 days ago
dln.c Remove IA64 support. 4 months ago
dln.h dln.c: extra arguments 6 years ago
dln_find.c dln_find.c: MAXPATHLEN is not used already 3 years ago
dmydln.c UNREACHABLE_RETURN 1 year ago
dmyenc.c load.c: tweak the return value 4 years ago
dmyext.c dmyenc.c: separate 4 years ago
encindex.h encoding.c: rb_enc_find_index2 1 year ago
encoding.c avoid overflow in integer multiplication 1 week ago
enum.c rb_rescue / rb_rescue2 now free from ANYARGS 1 month ago
enumerator.c Add rb_enumeratorize_with_size_kw and related macros 2 weeks ago
error.c forgot to delete unused #incude line 1 week ago
eval.c Suppress "clobbered" warnings by gcc 9.2.0 5 days ago
eval_error.c Renamed ruby_finalize_{0,1} 2 months ago
eval_intern.h solve "duplicate :raise event" [Bug #15877] 2 months ago
eval_jump.c drop-in type check for rb_define_global_function 1 month ago
file.c [DOC] no change on Windows [Bug #15267] [ci skip] 18 hours ago
gc.c make rb_raise a GVL-only function again 1 week ago
gc.h Rename rb_gc_mark_no_pin -> rb_gc_mark_movable 2 months ago
gem_prelude.rb Reduce system calls by activating the `did_you_mean` gem. 3 years ago
golf_prelude.rb golf_prelude.rb: suppress the redefining warning 3 months ago
goruby.c goruby.c: FD leak [ci skip] 2 years ago
hash.c Enhance doc for ENV.delete 5 days ago
hrtime.h hrtime.h: fix typo in non-builtin overflow check 1 year ago
id_table.c Revert 2 weeks ago
id_table.h Revert 2 weeks ago
inits.c Explicitly initialise encodings on init to remove branches on encoding lookup 2 months ago
insns.def Revert 2 weeks ago
internal.h make rb_raise a GVL-only function again 1 week ago
io.c io.c (rb_update_max_fd): fail with a negative file descripter 5 days ago
iseq.c avoid overflow in integer multiplication 1 week ago
iseq.h avoid overflow in integer multiplication 1 week ago
lex.c.blt keywords: shrink struct kwtable 1 year ago
load.c drop-in type check for rb_define_global_function 1 month ago
loadpath.c -Wno-overlength-strings 1 year ago
localeinit.c internal.h: remove dependecy on ruby/encoding.h 1 year ago
main.c main.c: Add doxygen mainpage 2 months ago
marshal.c drop-in type check for rb_define_module_function 1 month ago
math.c Add word "Euler's number" to Math::E docs 1 month ago
method.h * expand tabs. [ci skip] 2 weeks ago
miniinit.c miniinit.c: built-in encoding aliases 3 years ago
mjit.c Remove the quick stop path after convert_unit_to_func 4 days ago
mjit.h Rename mjit_gc_finish_hook to mjit_gc_exit_hook 5 months ago
mjit_compile.c Just disable inlining with local varaible for now 3 months ago
mjit_worker.c Eliminate the possibility to leave freed ISeq 4 days ago
node.c avoid overflow in integer multiplication 1 week ago
node.h Add compaction support to `rb_ast_t` 3 weeks ago
numeric.c Suppress keyword argument warning from #step 2 weeks ago
object.c [EXPERIMENTAL] Make NilClass#to_s, TrueClass#to_s and FalseClass#to_s return a frozen String 3 weeks ago
pack.c Added some examples to the documentation for String#unpack1 because 2 months ago
parse.y Make circular argument reference a SyntaxError instead of a warning 12 hours ago
prelude.rb Use `warn` with `uplevel:` instead of `caller` 6 days ago
probes.d change lingering dtrace probe documentation from function- to method- 4 years ago
probes_helper.h vm.c: disable dtrace in jit source 1 year ago
proc.c Module#define_method: Add UnboundMethod to expected classes 1 week ago
process.c Fix potential memory leaks by `rb_imemo_tmpbuf_auto_free_pointer` 1 week ago
random.c Adjusted spaces [ci skip] 3 weeks ago
range.c Make Range#=== operate like cover? instead of include? for string ranges 2 months ago
rational.c Make rb_scan_args handle keywords more similar to Ruby methods (#2460) 3 weeks ago
re.c Regexp#match{?} with nil raises TypeError as String, Symbol (#1506) 20 hours ago
regcomp.c Fix issues detected by code analysis tool (mainly Coverity). 1 year ago
regenc.c Merge Onigmo 6.1.1 2 years ago
regenc.h initializer paren-string `{("str")}` is a C99ism 1 year ago
regerror.c Escape control codes in regexp warning message 3 months ago
regexec.c Only define history_root member of the Oniguruma re_registers struct if USE_CAPTURE_HISTORY is enabled 5 months ago
regint.h Merge Onigmo 6.1.1 2 years ago
regparse.c st_foreach now free from ANYARGS 1 month ago
regparse.h Fix typos. 1 year ago
regsyntax.c Merge Onigmo 6.0.0 2 years ago
ruby-runner.c Fix warnings 1 month ago
ruby.c Refactor parser_params by removing "in_main" flag 2 weeks ago
ruby_assert.h respect NDEBUG. 3 months ago
ruby_atomic.h move atomic logic from mjit.c from ruby_atomic.h 1 year ago
rubystub.c rubystub.c: sys/param.h for MAXPATHLEN 3 years ago
safe.c rb_define_hooked_variable now free from ANYARGS 1 month ago
signal.c Share ruby_sighandler_t definition 1 week ago
siphash.c switch SipHash from SipHash24 to SipHash13 variant 2 years ago
siphash.h blacklist UBSAN's unsigned integer overflow 11 months ago
sparc.c 2 years ago
sprintf.c move docs around [ci skip] 1 month ago
st.c st.c: Use rb_st_* prefix instead of st_* (#2479) 3 weeks ago
strftime.c Prefer `rb_fstring_lit` over `rb_fstring_cstr` 1 year ago
string.c Reduce the minimum string buffer size from 127 to 63 bytes 1 week ago
struct.c Make direct calls to rb_{obj_instance,mod_module}_{eval,exec} not pass keywords 2 weeks ago
symbol.c Fix a use-after-free bug by avoiding rb_str_new_frozen 1 month ago
symbol.h Add RB_ID_SERIAL_MAX 5 months ago
thread.c Prefer st_is_member over st_lookup with 0 1 week ago
thread_pthread.c rb_thread_create now free from ANYARGS 1 month ago
thread_pthread.h thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document 1 year ago
thread_sync.c Adjusted spaces [ci skip] 3 weeks ago
thread_win32.c Remove IA64 support. 4 months ago
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. 5 years ago
time.c time.c: Fix some bugs about WIDEVALUE 1 week ago
timev.h timev.h: dummy definition for TAGS 6 months ago
transcode.c transcode.c (rb_econv_open0): remove unused code 2 months ago
transcode_data.h transcode_data.h: missing cast 4 years ago
transient_heap.c avoid overflow in integer multiplication 1 week ago
transient_heap.h Add `GC.compact` again. 6 months ago
util.c Split dtoa.c 8 months ago
variable.c Prefer st_is_member over st_lookup with 0 1 week ago
version.c Update RDoc of RUBY_REVISION 4 months ago
version.h * 2019-10-18 [ci skip] 13 hours ago
vm.c Revert 2 weeks ago
vm_args.c Dup hash with keyword flag when converted to keywords 2 days ago
vm_backtrace.c avoid overflow in integer multiplication 1 week ago
vm_core.h Share ruby_sighandler_t definition 1 week ago
vm_debug.h add rp() and bp() in internal.h. 2 months ago
vm_dump.c Adjusted spaces [ci skip] 3 weeks ago
vm_eval.c vm_eval.c (rb_adjust_argv_kw_splat): avoid memcpy with zero length 1 week ago
vm_exec.c vm_exec.c: reduced repeated same calls 1 year ago
vm_exec.h Fixed format specifiers 3 weeks ago
vm_insnhelper.c extracted declare_under 1 week ago
vm_insnhelper.h Merge pull request #2422 from jeremyevans/rb_keyword_given_p 1 month ago
vm_method.c Warn for calling public/protected/private/module_function without arguments inside method 1 day ago
vm_opts.h Unify SUPPORT_JOKE and OPT_SUPPORT_JOKE 1 month ago
vm_trace.c Renamed ruby_finalize_{0,1} 2 months ago
vsnprintf.c Use array indexing with considering clang's feeling 1 month ago
wercker.yml Generalize timeout_scale 4 months ago

Build Status wercker status Build status Build Status

What’s Ruby

Ruby is an interpreted object-oriented programming language often used for web development. It also offers many scripting features to process plain text and serialized files, or manage system tasks. It is simple, straightforward, 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, macOS, Haiku, etc.) cf.

How to get Ruby

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


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

$ git clone

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

$ git ls-remote

You may also want to use (actual master of Ruby source) if you are a committer.


Stable branches for older Ruby versions can be checked out with the following command:

$ svn co ruby

Try the following command to see the list of branches:

$ svn ls

Ruby home page

Mailing list

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


in the mail body (not subject) to the address

How to compile and install

  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.

    • On Mac, set RUBY_CODESIGN environment variable with a signing identity. It uses the identity to sign ruby binary. See also codesign(1).
  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. Optionally, run make update-gems and make extract-gems.

    If you want to install bundled gems, run make update-gems and make extract-gems before running make install.

  9. Run ‘make install’.

    This command will create the following directories and install files into 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 (

Bugs should be reported at Read HowToReport for more information.


See the file

The Author

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