Skip to content
The Ruby Programming Language [mirror]
Ruby C Yacc Objective-C Makefile C++ Other
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Allow rexml to fail on macOS of Github Actions Jan 19, 2020
basictest Fixed misspellings Dec 20, 2019
benchmark Drop executable bit of *.{yml,h,mk.tmpl} Jan 22, 2020
bin Removed the old executables of racc Dec 31, 2019
bootstraptest Remove special handling of $SAFE and related C-APIs Jan 22, 2020
ccan Fix typos [ci skip] Oct 14, 2019
coroutine Remove "All Rights Reserved." from Copyright statement. Dec 27, 2019
coverage Fix typo May 21, 2019
cygwin MFLAGS for nmake Feb 10, 2017
defs config.status should be newer than config.cache if exists Jan 8, 2020
doc Update documentation for Array/Hash Argument section of methods.rdoc Jan 17, 2020
enc update dependencies Dec 26, 2019
ext Make taint warnings non-verbose instead of verbose Jan 22, 2020
gems Removed xmlrpc and net-telnet from the bundled gems. Jan 16, 2020
include Remove special handling of $SAFE and related C-APIs Jan 22, 2020
internal internal/rational.h: insert assertions in RATIONAL_SET_{NUM,DEN} Jan 17, 2020
lib Fix pp when passed a empty ruby2_keywords-flagged hash as array element Jan 22, 2020
libexec Removed the old executables of racc Dec 31, 2019
man Merge bundler-2.1.4 Jan 8, 2020
misc Fixed misspellings Dec 20, 2019
missing internal/stdbool.h rework Dec 26, 2019
sample Fixed misspellings Dec 20, 2019
spec Update version guard Jan 15, 2020
template Get rid of use of special variables Jan 20, 2020
test Fix pp when passed a empty ruby2_keywords-flagged hash as array element Jan 22, 2020
tool Added usage documentation for sync_default_gems Jan 22, 2020
win32 decouple internal.h headers Dec 26, 2019
.dir-locals.el add .dir-locals.el [ci skip] Dec 27, 2018
.document NEWS.md: converted from NEWS Jan 15, 2020
.editorconfig Remove duplicated and change order Mar 21, 2019
.gdbinit Redmine /projects/ruby-trunk is now redirected Jan 1, 2020
.gitattributes Add tool/leaked-globals to .gitattributes [ci skip] Jul 15, 2019
.gitignore Check -1 arity for C++ Nov 22, 2019
.rspec_parallel Introduce test-bundler-parallel task. Aug 21, 2019
.travis.yml Remove s390x from allow_failures Jan 14, 2020
BSDL * BSDL: update copyright notice for 2013. Feb 9, 2013
CONTRIBUTING.md [DOC] Please see _the_ official issue tracker... [ci skip] Jun 13, 2014
COPYING COPYING: reformat as RDoc Feb 2, 2019
COPYING.ja COPYING: reformat as RDoc Feb 2, 2019
GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328] Jun 3, 2012
KNOWNBUGS.rb compile.c: fix positions encode Apr 5, 2018
LEGAL Split procstat_vm.c Feb 7, 2019
NEWS.md Remove special handling of $SAFE and related C-APIs Jan 22, 2020
README.EXT README.EXT: add redirect [ruby-core:68631] Mar 25, 2015
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631] Mar 30, 2015
README.ja.md README.ja.md: removed the badge for Cygwin [ci skip] Jan 19, 2020
README.md README.md: removed the badge for Cygwin [ci skip] Jan 19, 2020
aclocal.m4 configure.ac: check finite,isinf,isnan as macros first Feb 8, 2019
addr2line.c internal/stdbool.h rework Dec 26, 2019
addr2line.h Support Mach-O on backtrace with DWARF Oct 20, 2018
appveyor.yml Remove code to prevent double build on trunk Jan 1, 2020
array.c Optimize Array#rotate!(n) for n = 1 and n = -1 Dec 29, 2019
ast.c Separate builtin initialization calls Dec 29, 2019
ast.rb Fix variable name and add more example [ci skip] Jan 2, 2020
bignum.c bignum.c: extract bdigits_to_mpz and bdigits_from_mpz (#2805) Jan 1, 2020
builtin.c take care of USE_LAZY_LOAD=1. Dec 25, 2019
builtin.h readable function names for inline functions. Dec 13, 2019
class.c Clarify documentation for Module#included_modules and Module#included? Jan 16, 2020
common.mk Remove special handling of $SAFE and related C-APIs Jan 22, 2020
compar.c decouple internal.h headers Dec 26, 2019
compile.c move internal/debug.h definitions to internal.h Jan 2, 2020
complex.c decouple internal.h headers Dec 26, 2019
configure.ac avoid undefined behaviour when n==0 Jan 10, 2020
constant.h decouple internal.h headers Dec 26, 2019
cont.c Let execution context local storage be an ID table Jan 11, 2020
debug.c move internal/debug.h definitions to internal.h Jan 2, 2020
debug_counter.c add debug_counter access functions. Dec 24, 2019
debug_counter.h debug_counter.h must be self-contained Dec 26, 2019
dir.c Fixed double closedir Jan 20, 2020
dln.c decouple internal.h headers Dec 26, 2019
dln.h decouple internal.h headers Dec 26, 2019
dln_find.c dln_find.c: MAXPATHLEN is not used already Jun 2, 2016
dmydln.c UNREACHABLE_RETURN Jul 24, 2018
dmyenc.c load.c: tweak the return value Dec 3, 2014
dmyext.c dmyenc.c: separate Nov 27, 2014
encindex.h decouple internal.h headers Dec 26, 2019
encoding.c decouple internal.h headers Dec 26, 2019
enum.c decouple internal.h headers Dec 26, 2019
enumerator.c Fully separate positional arguments and keyword arguments Jan 3, 2020
error.c Make taint warnings non-verbose instead of verbose Jan 22, 2020
eval.c Fully separate positional arguments and keyword arguments Jan 3, 2020
eval_error.c Renamed ruby_finalize_{0,1} Aug 13, 2019
eval_intern.h Create backtrace location array directly Dec 13, 2019
eval_jump.c drop-in type check for rb_define_global_function Aug 29, 2019
file.c decouple internal.h headers Dec 26, 2019
gc.c Fix syntax error in obj_free with hash size debug counter when USE_DE… Jan 12, 2020
gc.h Rename RUBY_MARK_NO_PIN_UNLESS_NULL to RUBY_MARK_MOVABLE_UNLESS_NULL Jan 22, 2020
gc.rb Add option hash doc for GC stats. Jan 15, 2020
gem_prelude.rb Do not call 'gem "did_you_mean"' for now Dec 1, 2019
golf_prelude.rb golf_prelude.rb: suppress the redefining warning Jun 22, 2019
goruby.c goruby.c: FD leak [ci skip] Mar 9, 2017
hash.c Make taint warnings non-verbose instead of verbose Jan 22, 2020
hrtime.h hrtime.h: fix typo in non-builtin overflow check Aug 30, 2018
id_table.c Revert #2486 Oct 3, 2019
id_table.h decouple internal.h headers Dec 26, 2019
inits.c Remove special handling of $SAFE and related C-APIs Jan 22, 2020
insns.def Introduce an "Inline IVAR cache" struct Dec 5, 2019
internal.h move internal/debug.h definitions to internal.h Jan 2, 2020
io.c Drop executable bit set by 25f2005 Jan 21, 2020
io.rb Define IO#read/write_nonblock with builtins. Nov 8, 2019
iseq.c Rename RUBY_MARK_NO_PIN_UNLESS_NULL to RUBY_MARK_MOVABLE_UNLESS_NULL Jan 22, 2020
iseq.h decouple internal.h headers Dec 26, 2019
lex.c.blt keywords: shrink struct kwtable Jan 21, 2018
load.c decouple internal.h headers Dec 26, 2019
loadpath.c -Wno-overlength-strings Jan 16, 2018
localeinit.c internal.h: remove dependecy on ruby/encoding.h Jan 9, 2018
main.c main.c: Add doxygen mainpage Aug 8, 2019
marshal.c marshal.c: Support dump and load of a Hash with the ruby2_keywords flag Jan 17, 2020
math.c decouple internal.h headers Dec 26, 2019
method.h decouple internal.h headers Dec 26, 2019
mini_builtin.c decouple internal.h headers Dec 26, 2019
miniinit.c support builtin features with Ruby and C. Nov 8, 2019
mjit.c decouple internal.h headers Dec 26, 2019
mjit.h decouple internal.h headers Dec 26, 2019
mjit_compile.c decouple internal.h headers Dec 26, 2019
mjit_worker.c Allow specifying arbitrary MJIT flags by --jit-debug Dec 1, 2019
node.c decouple internal.h headers Dec 26, 2019
node.h Deprecate taint/trust and related methods, and make the methods no-ops Nov 17, 2019
numeric.c decouple internal.h headers Dec 26, 2019
object.c Make taint warnings non-verbose instead of verbose Jan 22, 2020
pack.c Separate builtin initialization calls Dec 29, 2019
pack.rb Rubified the APIs of pack.c Nov 8, 2019
parse.y Make RATIONAL_SET_{NUM,DEN} static inline functions Jan 17, 2020
prelude.rb Define IO#read/write_nonblock with builtins. Nov 8, 2019
probes.d change lingering dtrace probe documentation from function- to method- May 30, 2015
probes_helper.h internal/vm.h rework Dec 26, 2019
proc.c Rename RUBY_MARK_NO_PIN_UNLESS_NULL to RUBY_MARK_MOVABLE_UNLESS_NULL Jan 22, 2020
process.c decouple internal.h headers Dec 26, 2019
random.c Ensure seed data to be cleared Jan 10, 2020
range.c decouple internal.h headers Dec 26, 2019
rational.c rb_rational_raw: convert num and den by to_int Jan 17, 2020
re.c `Regexp` in `MatchData` can be `nil` Jan 16, 2020
regcomp.c Fix issues detected by code analysis tool (mainly Coverity). Sep 15, 2018
regenc.c Merge Onigmo 6.1.1 Feb 11, 2017
regenc.h initializer paren-string `{("str")}` is a C99ism Jan 2, 2018
regerror.c Escape control codes in regexp warning message Jun 29, 2019
regexec.c Only define history_root member of the Oniguruma re_registers struct … Apr 23, 2019
regint.h Merge Onigmo 6.1.1 Feb 11, 2017
regparse.c Fixed misspellings Dec 20, 2019
regparse.h Fix typos. Jan 18, 2018
regsyntax.c Merge Onigmo 6.0.0 Dec 10, 2016
ruby-runner.c Fix warnings Aug 28, 2019
ruby.c io.c, ruby.c: include internal/variable.h for rb_gvar_readonly_setter Jan 9, 2020
ruby_assert.h respect NDEBUG. Jul 19, 2019
ruby_atomic.h add several __has_something macro Dec 26, 2019
rubystub.c rubystub.c: sys/param.h for MAXPATHLEN Aug 20, 2016
signal.c decouple internal.h headers Dec 26, 2019
siphash.c switch SipHash from SipHash24 to SipHash13 variant Jan 20, 2017
siphash.h blacklist UBSAN's unsigned integer overflow Nov 7, 2018
sparc.c configure.ac Sep 29, 2017
sprintf.c decouple internal.h headers Dec 26, 2019
st.c decouple internal.h headers Dec 26, 2019
strftime.c decouple internal.h headers Dec 26, 2019
string.c Make taint warnings non-verbose instead of verbose Jan 22, 2020
struct.c decouple internal.h headers Dec 26, 2019
symbol.c decouple internal.h headers Dec 26, 2019
symbol.h decouple internal.h headers Dec 26, 2019
thread.c st_delete_wrap is no longer used Jan 11, 2020
thread_pthread.c rb_thread_create now free from ANYARGS Aug 27, 2019
thread_pthread.h thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document Aug 28, 2018
thread_sync.c add assertion for mutex_lock. Oct 28, 2019
thread_win32.c Remove IA64 support. Jun 19, 2019
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. May 14, 2014
time.c Simplify obj2ubits checks Jan 13, 2020
timev.h decouple internal.h headers Dec 26, 2019
trace_point.rb Fix output of example [ci skip] Jan 4, 2020
transcode.c Warn when :newline precedes other newline options Jan 11, 2020
transcode_data.h transcode_data.h: missing cast Aug 8, 2015
transient_heap.c decouple internal.h headers Dec 26, 2019
transient_heap.h Add `GC.compact` again. Apr 20, 2019
util.c decouple internal.h headers Dec 26, 2019
variable.c always expand ivar arrays to max width Jan 6, 2020
variable.h fastpath for ivar read of FL_EXIVAR objects. Nov 28, 2019
version.c Provides ruby2_keywords Oct 22, 2019
version.h * 2020-01-23 [ci skip] Jan 22, 2020
vm.c Let execution context local storage be an ID table Jan 11, 2020
vm_args.c Fix unused warnings Jan 3, 2020
vm_backtrace.c decouple internal.h headers Dec 26, 2019
vm_core.h Let execution context local storage be an ID table Jan 11, 2020
vm_debug.h add rp() and bp() in internal.h. Aug 9, 2019
vm_dump.c support RUBY_ON_BUG envval on assert failure. Jan 6, 2020
vm_eval.c script_compiled event on compile error. Jan 6, 2020
vm_exec.c Add VM insns counter like debug_counter (#2789) Dec 28, 2019
vm_exec.h Add VM insns counter like debug_counter (#2789) Dec 28, 2019
vm_insnhelper.c Fully separate positional arguments and keyword arguments Jan 3, 2020
vm_insnhelper.h per-method serial number Dec 18, 2019
vm_method.c VALUE is narrower than rb_serial_t Jan 21, 2020
vm_opts.h Use cppflags to pass preprocessor options Oct 22, 2019
vm_trace.c Separate builtin initialization calls Dec 29, 2019
vsnprintf.c Use array indexing with considering clang's feeling Aug 27, 2019
warning.rb Fix a typo [ci skip] Jan 2, 2020

README.md

Build Status Build status Actions Status Actions Status Actions Status Actions Status Actions 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. https://github.com/ruby/ruby/blob/master/doc/contributing.rdoc#platform-maintainers

How to get Ruby

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

https://www.ruby-lang.org/en/downloads/

Git

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

$ git clone https://github.com/ruby/ruby.git

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

$ git ls-remote https://github.com/ruby/ruby.git

You may also want to use https://git.ruby-lang.org/ruby.git (actual master of Ruby source) if you are a committer.

Subversion

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

$ svn co https://svn.ruby-lang.org/repos/ruby/branches/ruby_2_6/ ruby

Try the following command to see the list of branches:

$ svn ls https://svn.ruby-lang.org/repos/ruby/branches/

Ruby home page

https://www.ruby-lang.org/

Mailing list

There is a mailing list to discuss Ruby. To subscribe to 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

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

Copying

See the file COPYING.

Feedback

Questions about the Ruby language can be asked on the Ruby-Talk mailing list (https://www.ruby-lang.org/en/community/mailing-lists) or on websites like (https://stackoverflow.com).

Bugs should be reported at https://bugs.ruby-lang.org. Read HowToReport for more information.

Contributing

See the file CONTRIBUTING.md

The Author

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

matz@ruby-lang.org

You can’t perform that action at this time.