The Wayback Machine - https://web.archive.org/web/20181203234531/https://github.com/ruby/ruby
Skip to content
The Ruby Programming Language https://www.ruby-lang.org/
Clone or download
normal
normal process.c (retry_fork_async_signal_safe): fix -Wclobbered on i686
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Latest commit 7712ffc Dec 3, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
basictest basictest: --run-opt option Oct 19, 2016
benchmark Rename fiber chain benchmark. Nov 20, 2018
bin Regenerated binstubs of bundler, rdoc and irb. Nov 28, 2018
bootstraptest Simply treat IO::WaitReadable just like Errno::EAGAIN Nov 20, 2018
ccan ccan/list: sync with upstream Feb 1, 2018
coroutine Fix for coroutine/win32/Context.obj Nov 28, 2018
coverage fix a typo [ci skip] Sep 12, 2014
cygwin MFLAGS for nmake Feb 10, 2017
defs Always try to update revision.h with GNU make Nov 29, 2018
doc [DOC] rational and imaginary literals [ci skip] Nov 17, 2018
enc solve the genie/zombie/wrestlers bug Dec 2, 2018
ext ext/bigdecimal/bigdecimal.c: drop unused function Dec 3, 2018
gems Update latest versions of bundled gems. Jul 25, 2018
include make `RARRAY_PTR_USE` more conservertive. Dec 3, 2018
lib Fixed test fails against OpenSSL 1.1.1. Dec 3, 2018
libexec Use stub executables generated by RubyGems istead of original executa… Nov 25, 2018
man Merge bundler-2.0.0.pre.2 from upstream. Nov 27, 2018
misc ruby-style.el: ruby-style-c-mode by VCS [ci skip] Nov 27, 2018
missing [ci skip] tabify Jan 20, 2018
sample Fix typo in trick2018/README [ci skip] Dec 3, 2018
spec Use /bin/echo instead of shell builtin echo Dec 3, 2018
template Let sub-directory exts depend on their parent ext Dec 1, 2018
test process.c: fix ETXTBUSY from MJIT compiler process Dec 3, 2018
tool update-deps: support coroutine dependencies Dec 3, 2018
win32 update-deps: support coroutine dependencies Dec 3, 2018
.document Include LEGAL in .document [ci skip] Dec 1, 2018
.editorconfig Set indent_size of reg*.[ch] to 2 [ci skip] Oct 3, 2018
.gdbinit support theap for T_HASH. [Feature #14989] Oct 30, 2018
.gitattributes rename ruby-runner as bin/ruby Sep 15, 2017
.gitignore Ignore goruby wrapper Dec 3, 2018
.indent.pro * .indent.pro: added for ruby-style. Mar 11, 2010
.travis.yml .travis.yml: cache unicode.org files Nov 29, 2018
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: expand tabs Feb 18, 2017
COPYING.ja Change encoding from EUC-JP to UTF-8. [Feature #5128] Sep 4, 2011
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 LEGAL: update [ci skip] Dec 1, 2018
Makefile.in Change Makefile rule for assembly to use .S rather than .s Nov 24, 2018
NEWS add a NEWS entry of TracePoint#enable Dec 3, 2018
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 [DOC] Added CI build status for Japanese docs Jul 31, 2018
README.md README.md: add wercker status badge [ci skip] Nov 2, 2018
aclocal.m4 Update aclocal to 1.16.1 [ci skip] Oct 5, 2018
addr2line.c Show function name based on dladdr Nov 20, 2018
addr2line.h Support Mach-O on backtrace with DWARF Oct 20, 2018
appveyor.yml Try with TZInfo and Timezone gems Nov 28, 2018
array.c * expand tabs. Dec 3, 2018
ast.c Refine RubyVM::AbstractSyntaxTree::Node#type Dec 3, 2018
bignum.c bignum.c: fix bug in big2dbl() Nov 16, 2018
class.c * remove trailing spaces, expand tabs. Oct 30, 2018
common.mk update-deps: support coroutine dependencies Dec 3, 2018
compar.c Comparable#clamp Aug 11, 2016
compile.c Revert "Collapse putobject, putobject, newarray" Dec 1, 2018
complex.c complex.c: rb_dbl_complex_polar_pi Nov 4, 2018
configure.ac use __builtin_setjmp on mingw64 [Bug #15348]. Nov 29, 2018
constant.h vm_insnhelper.c: rb_autoloading_value flag Feb 13, 2018
cont.c Avoid GCing dead stack after switching away from a fiber Dec 1, 2018
debug.c internal.h: remove dependecy on ruby/io.h Jan 9, 2018
debug_counter.c add debug counters more. Sep 28, 2018
debug_counter.h support theap for T_HASH. [Feature #14989] Oct 30, 2018
dir.c fix "initialize miss". Sep 26, 2018
dln.c reduce copy & paste Jul 30, 2018
dln.h dln.c: extra arguments Jun 30, 2013
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 encoding.c: rb_enc_find_index2 Dec 22, 2017
encoding.c encoding.c: check external encoding Sep 15, 2018
enum.c make `RARRAY_PTR_USE` more conservertive. Dec 3, 2018
enumerator.c use RARRAY_AREF instead of RARRAY_PTR_USE. Dec 3, 2018
error.c Add rb_typeddata_is_instance_of Nov 27, 2018
eval.c process.c: avoid dlclose before exec Nov 26, 2018
eval_error.c eval_error.c: log10(0) is ERANGE Nov 15, 2018
eval_intern.h reduce copy & paste Jul 30, 2018
eval_jump.c `$SAFE` as a process global state. [Feature #14250] Dec 28, 2017
file.c file.c: use correct integer-conversion function Oct 23, 2018
gc.c Remove HEAP_ALIGN_LOG setting in configure.ac for OpenBSD/MirOS Nov 29, 2018
gc.h remove rb_threadptr_during_gc(). Oct 29, 2017
gem_prelude.rb Reduce system calls by activating the `did_you_mean` gem. Feb 25, 2016
golf_prelude.rb added `f` for 1 byte FizzBuzz because Hexagony has such feature May 21, 2018
goruby.c goruby.c: FD leak [ci skip] Mar 9, 2017
hash.c make `RARRAY_PTR_USE` more conservertive. Dec 3, 2018
hrtime.h hrtime.h: fix typo in non-builtin overflow check Aug 30, 2018
ia64.S Change Makefile rule for assembly to use .S rather than .s Nov 24, 2018
id_table.c adjust styles [ci skip] May 10, 2017
id_table.h id_table.h: dummy sentinel Aug 6, 2016
inits.c initialize VM postponed_job first. [Bug #15288] Nov 8, 2018
insns.def Rename get/setinlinecache to opt_get/opt_setinlinecache Nov 7, 2018
internal.h make `RARRAY_PTR_USE` more conservertive. Dec 3, 2018
io.c io.c: fix clang -Werror,-Wshorten-64-to-32 on Linux sendfile Nov 29, 2018
iseq.c Add rb_typeddata_is_instance_of Nov 27, 2018
iseq.h `TracePoint#enable(target_line:)` is supported. [Feature #15289] Nov 26, 2018
lex.c.blt keywords: shrink struct kwtable Jan 21, 2018
load.c Prefer `rb_fstring_lit` over `rb_fstring_cstr` Oct 13, 2018
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: RUBY_DEBUG_ENV in devel Jun 30, 2017
marshal.c avoid division by zero Nov 16, 2018
math.c math.c: adjust cbrt Jun 6, 2018
method.h Revert "Symbol refinements" Dec 3, 2018
miniinit.c miniinit.c: built-in encoding aliases Dec 26, 2015
mjit.c mjit.c: eliminate -save-temps flag Dec 3, 2018
mjit.h vm_trace.c: MJIT-limited thread-safety for postponed_job Nov 26, 2018
mjit_compile.c mjit.c: copy call cache values to MJIT worker Oct 21, 2018
mjit_worker.c mjit.c: eliminate -save-temps flag Dec 3, 2018
node.c Removed unreachable code Oct 12, 2018
node.h Parse the source in SCRIPT_LINES__ as array Nov 10, 2018
numeric.c Make some internal functions static Nov 16, 2018
object.c object.c: Deprecate Object#=~ and add NilClass#=~` Nov 26, 2018
pack.c pack.c: cast from double to float can be undefined Nov 16, 2018
parse.y Fix locations of NODE_UNDEF in undef with multiple args Nov 25, 2018
prelude.rb `TracePoint#enable(target_line:)` is supported. [Feature #15289] Nov 26, 2018
probes.d change lingering dtrace probe documentation from function- to method- May 30, 2015
probes_helper.h vm.c: disable dtrace in jit source Feb 20, 2018
proc.c * expand tabs. Nov 26, 2018
process.c process.c (retry_fork_async_signal_safe): fix -Wclobbered on i686 Dec 3, 2018
random.c suppress integer overflow warnings Nov 13, 2018
range.c range.c: [DOC] improve docs for Range#cover? Oct 12, 2018
rational.c rational.c (nurat_div): use the dedicated function nurat_to_f Nov 14, 2018
re.c char is not unsigned Nov 21, 2018
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 regerror.c: lenghten MAX_ERROR_PAR_LEN to contain old property names Oct 16, 2018
regexec.c label as lvalue is a GCCism Jan 2, 2018
regint.h Merge Onigmo 6.1.1 Feb 11, 2017
regparse.c remove unnecessary settings with NULL_NODE in \X implementation Dec 2, 2018
regparse.h Fix typos. Jan 18, 2018
regsyntax.c Merge Onigmo 6.0.0 Dec 10, 2016
ruby-runner.c ruby-runner.c: enable MJIT_SEARCH_BUILD_DIR only if no relative loading Nov 7, 2018
ruby.c ruby.c: do not surface MJIT to user Nov 19, 2018
ruby_assert.h string literal longer than 509 characters is a C99ism Jan 2, 2018
ruby_atomic.h move atomic logic from mjit.c from ruby_atomic.h Aug 1, 2018
rubystub.c rubystub.c: sys/param.h for MAXPATHLEN Aug 20, 2016
safe.c `$SAFE` as a process global state. [Feature #14250] Dec 28, 2017
signal.c refactoring debug_counter. Sep 25, 2018
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 sprintf.c: fix typo Apr 22, 2018
st.c st.c: bin might be zero Nov 8, 2018
strftime.c Prefer `rb_fstring_lit` over `rb_fstring_cstr` Oct 13, 2018
string.c string.c: [DOC] deprecate String#crypt [ci skip] [Feature #14915] Dec 3, 2018
struct.c * expand tabs. Nov 5, 2018
symbol.c symbol.c: dsymbol initial encoding Jun 28, 2018
symbol.h symbol.h: remove stale symbol deleted at r47913 Apr 6, 2018
thread.c vm_trace.c: workqueue as thread-safe version of postponed_job Nov 30, 2018
thread_pthread.c thread_pthread.c (rb_reserved_fd_p): false-positive on negative FD Nov 20, 2018
thread_pthread.h thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document Aug 28, 2018
thread_sync.c Add some missing documentation to Queue#{close|deq} [ci skip] Sep 16, 2018
thread_win32.c add disabling MJIT features option. Oct 20, 2018
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. May 14, 2014
time.c time.c: rescue find_timezone when loading Nov 28, 2018
timev.h Timezone support by Time [Feature #14850] Oct 8, 2018
transcode.c Fix call-seq of Encoding::Converter#putback [ci skip] Nov 1, 2018
transcode_data.h transcode_data.h: missing cast Aug 8, 2015
transient_heap.c adopt sanitizer API Nov 6, 2018
transient_heap.h introduce USE_TRANSIENT_HEAP to enable/disable theap. Nov 1, 2018
util.c suppress integer overflow warnings Nov 15, 2018
variable.c No new entry when getting undefined global variable Nov 25, 2018
version.c add disabling MJIT features option. Oct 20, 2018
version.h * 2018-12-04 Dec 3, 2018
vm.c ALWAYS_INLINE implies inline always Nov 27, 2018
vm_args.c Revert "Symbol refinements" Dec 3, 2018
vm_backtrace.c Make some internal functions static Nov 16, 2018
vm_core.h vm_trace.c: workqueue as thread-safe version of postponed_job Nov 30, 2018
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} Apr 5, 2013
vm_dump.c * expand tabs. [ci skip] Nov 7, 2018
vm_eval.c Enable refinements to public_send. Nov 22, 2018
vm_exec.c vm_exec.c: reduced repeated same calls Mar 4, 2018
vm_exec.h fix typo. Sep 21, 2018
vm_insnhelper.c * expand tabs. Nov 26, 2018
vm_insnhelper.h vm_insnhelper.h: rename CI_SET_FASTPATH to CC_SET_FASTPATH Sep 18, 2018
vm_method.c Revert "Symbol refinements" Dec 3, 2018
vm_opts.h vm_opts.h: share USE_IC_FOR_IVAR as OPT_IC_FOR_IVAR Oct 14, 2018
vm_trace.c vm_trace.c: workqueue as thread-safe version of postponed_job Nov 30, 2018
vsnprintf.c avoid division by zero Nov 16, 2018
wercker.yml wercker.yml: debug problematic test on test-all Nov 18, 2018

README.md

Build Status Build status wercker status

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, macOS, Haiku, etc.) cf. https://github.com/ruby/ruby/blob/trunk/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/

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

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

Or if you are using git then use 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:

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

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

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

Ruby home page

The URL of the Ruby home page is:

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

Mailing list

There is a mailing list to talk about 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

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

Bug reports should be filed 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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.