Skip to content
The Ruby Programming Language [mirror]
Ruby C Yacc Makefile Objective-C C++ Other
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Respect BIGNUM_DEBUG defined by command line option May 28, 2020
basictest Fixed misspellings Dec 20, 2019
benchmark Added String#split benchmark for empty regexp May 12, 2020
bin Removed the old executables of racc Dec 31, 2019
bootstraptest Moved already resolved test Apr 27, 2020
ccan Fix typos [ci skip] Oct 14, 2019
coroutine Patch assembly so that it aligns properly Apr 1, 2020
coverage Fix typo May 21, 2019
cygwin Merged recipes for the same target May 27, 2020
defs Pass MAKE value to configure for non-default name case May 10, 2020
doc [DOC] Turned note-lists into label-lists [ci skip] May 25, 2020
enc sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
ext Allow references to $$ in Ripper DSL May 29, 2020
gems power_assert repository is transferred to ruby/power_assert Apr 18, 2020
include RUBY_ASSERT_NOASSUME May 29, 2020
internal Allow Dir.home to work for non-login procs when $HOME not set May 23, 2020
lib Improve documentation for Net::HTTPHeader#set_form [ci skip] May 27, 2020
libexec Sync Bundler PR #3624 with HEAD commits May 22, 2020
man Sync Bundler PR #3624 May 22, 2020
misc Add T_IMEMO support to lldb May 7, 2020
missing sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
sample [ruby/openssl] Look up digest by name instead of constant May 13, 2020
spec Use receiver #name rather than #inspect to build NameError message May 26, 2020
template Build auxiliary program files early May 12, 2020
test Explicitly loading with envutil.rb May 28, 2020
tool Add a debug_counter for JIT cancel on leave May 29, 2020
win32 Get rid of redefinition of memcpy on mingw May 26, 2020
.dir-locals.el emacs mode addition Feb 6, 2020
.document Moved `Dir.open` and `Dir#initialize` to dir.rb Apr 6, 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 Revert "Moved aclocal.m4 to macro directory" Apr 5, 2020
.rspec_parallel Introduce test-bundler-parallel task. Aug 21, 2019
.travis.yml Travis s390x-linux is too unstable May 3, 2020
BSDL [ruby/irb] Reformat LICENSE.txt [ci skip] Feb 1, 2020
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 [DOC] Use note-list to pretend original plain-text looks [ci skip] May 26, 2020
NEWS.md Added entries about RubyGems and Bundler May 25, 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*.md: `defines.h` moved [ci skip] Jan 31, 2020
README.md Fix bundled gems installation on a fresh clone Mar 14, 2020
aclocal.m4
addr2line.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
addr2line.h add #include guard hack Apr 13, 2020
appveyor.yml Fix AppVeyor pull request CI (#2983) Mar 26, 2020
array.c Fix max, min, minmax documentation (#3131) May 27, 2020
array.rb Removed useless shebang and executable bit [ci skip] Feb 1, 2020
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 Respect BIGNUM_DEBUG defined by command line option May 28, 2020
builtin.c take care of USE_LAZY_LOAD=1. Dec 25, 2019
builtin.h Get rid of redefinition of `rb_execution_context_t` Mar 19, 2020
class.c Fix origin iclass pointer for modules May 23, 2020
common.mk Remove platform directory when distclean or more [ci skip] May 27, 2020
compar.c decouple internal.h headers Dec 26, 2019
compile.c add indent for debug disasm output May 29, 2020
complex.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
configure.ac Check that BASERUBY is at least Ruby 2.2 in configure May 28, 2020
constant.h add #include guard hack Apr 13, 2020
cont.c Fix documentation for Fiber#raise [ci skip] May 26, 2020
debug.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
debug_counter.c Avoid doubly showing debug counters Mar 15, 2020
debug_counter.h Add a debug_counter for JIT cancel on leave May 29, 2020
dir.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
dir.rb Moved `Dir.[]` to dir.rb Apr 6, 2020
dln.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
dln.h add #include guard hack Apr 13, 2020
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 add #include guard hack Apr 13, 2020
encoding.c Fallback to built-in UTF-8 for miniruby May 16, 2020
enum.c Fix max, min, minmax documentation (#3131) May 27, 2020
enumerator.c Update Enumerable::Yielder#to_proc document (#3142) May 27, 2020
error.c Use receiver #name rather than #inspect to build NameError message May 26, 2020
eval.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
eval_error.c Merge pull request #3047 from mame/suppress-backtrace May 14, 2020
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 Allow Dir.home to work for non-login procs when $HOME not set May 23, 2020
gc.c Extract "free moved list" function May 28, 2020
gc.h Rename RUBY_MARK_NO_PIN_UNLESS_NULL to RUBY_MARK_MOVABLE_UNLESS_NULL Jan 22, 2020
gc.rb Fix call-seq of GC.verify_compaction_references [ci skip] Jan 27, 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 Enhanced Rdoc for Hash (#3151) May 28, 2020
hrtime.h hrtime.h: fix typo in non-builtin overflow check Aug 30, 2018
id_table.c reroute redefinition of NDEBUG Apr 21, 2020
id_table.h sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
inits.c Defer initialization May 16, 2020
insns.def Turn class variable warnings into exceptions Apr 10, 2020
internal.h export debug utility functions May 29, 2020
io.c Fixed a variable name [Bug #16903] May 21, 2020
io.rb Define IO#read/write_nonblock with builtins. Nov 8, 2019
iseq.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
iseq.h add #include guard hack Apr 13, 2020
kernel.rb support builtin for Kernel#Float Apr 22, 2020
lex.c.blt keywords: shrink struct kwtable Jan 21, 2018
load.c Remove deprecated rb_require_safe Apr 30, 2020
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 sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
math.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
method.h add #include guard hack Apr 13, 2020
mini_builtin.c decouple internal.h headers Dec 26, 2019
miniinit.c support builtin features with Ruby and C. Nov 8, 2019
mjit.c Eliminate a call instruction on JIT cancel path May 27, 2020
mjit.h Carve out mjit_exec_slowpath May 27, 2020
mjit_compile.c Eliminate a call instruction on JIT cancel path May 27, 2020
mjit_worker.c sed -i s/RUBY3/RBIMPL/g May 11, 2020
node.c decouple internal.h headers Dec 26, 2019
node.h Constified code_loc_gen May 14, 2020
numeric.c numeric.c: optimize `float ** 2` case by fastpath May 11, 2020
object.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
pack.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
pack.rb Rubified the APIs of pack.c Nov 8, 2019
parse.y Fixed argument forwarding in reserved word method [Bug #16854] May 15, 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 [DOC] Separated Method#[] from Method#call [Bug #16813] [ci skip] Apr 24, 2020
process.c Allow Dir.home to work for non-login procs when $HOME not set May 23, 2020
random.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
range.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
rational.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
re.c sed -i 's|ruby/impl|ruby/internal|' May 11, 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 sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
ruby.c Defer initialization May 16, 2020
ruby_assert.h Use RUBY_DEBUG instead of NDEBUG May 25, 2020
ruby_atomic.h
rubystub.c rubystub.c: sys/param.h for MAXPATHLEN Aug 20, 2016
signal.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
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 sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
st.c Adjusted indents [ci skip] Mar 16, 2020
strftime.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
string.c add static modifier for rb_str_ord func May 27, 2020
struct.c Added GC guard for splatted array May 8, 2020
symbol.c [DOC] Added document for rb_check_symbol() [ci skip] May 24, 2020
symbol.h add #include guard hack Apr 13, 2020
thread.c Make Thread#thread_variable? similar to #thread_variable_get May 26, 2020
thread_pthread.c Get rid of -Wgnu-folding-constant errors May 1, 2020
thread_pthread.h add #include guard hack Apr 13, 2020
thread_sync.c Thread scheduler for light weight concurrency. May 14, 2020
thread_win32.c Remove IA64 support. Jun 19, 2019
thread_win32.h add #include guard hack Apr 13, 2020
time.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
timev.h decouple internal.h headers Dec 26, 2019
trace_point.rb Fix output of example [ci skip] Jan 4, 2020
transcode.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
transcode_data.h add #include guard hack Apr 13, 2020
transient_heap.c decouple internal.h headers Dec 26, 2019
transient_heap.h add #include guard hack Apr 13, 2020
util.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
variable.c sed -i 's|ruby/impl|ruby/internal|' May 11, 2020
variable.h add #include guard hack Apr 13, 2020
version.c Provides ruby2_keywords Oct 22, 2019
version.h * 2020-05-29 [ci skip] May 28, 2020
vm.c Fix origin iclass pointer for modules May 23, 2020
vm_args.c Suppress probably impossible maybe-uninitialized warning May 10, 2020
vm_backtrace.c Add compaction support for backtrace objects May 7, 2020
vm_callinfo.h add #include guard hack Apr 13, 2020
vm_core.h Thread scheduler for light weight concurrency. May 14, 2020
vm_debug.h add #include guard hack Apr 13, 2020
vm_dump.c Prefer configured printf format for mingw gcc 10 May 26, 2020
vm_eval.c drop varargs.h support May 11, 2020
vm_exec.c Add VM insns counter like debug_counter (#2789) Dec 28, 2019
vm_exec.h add #include guard hack Apr 13, 2020
vm_insnhelper.c Mark vm_stackoverflow as NOINLINE COLDFUNC on JIT May 27, 2020
vm_insnhelper.h Suppress warnings no inline ruby debug (#3107) May 22, 2020
vm_method.c Just call search_method_protect [Bug #16669] Apr 23, 2020
vm_opts.h add #include guard hack Apr 13, 2020
vm_trace.c Clear all trace events during teardown Mar 30, 2020
vsnprintf.c [win32] suppress false warning by mingw gcc Mar 4, 2020
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 include/ruby/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. 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.