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.
git 38b7f947a2 * 2019-12-06 [ci skip] 9 hours ago
.github/workflows Make extract-gems only if test_task is check 5 days ago
basictest colors file has been moved from test to tool 5 months ago
benchmark Remove unneeded exec bits from some files 3 weeks ago
bin Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
bootstraptest Use a monotonically increasing number for object_id 4 weeks ago
ccan Fix typos [ci skip] 1 month ago
coroutine coroutine/ucontext/Context.c: define __EXTENSIONS__ explicitly 11 hours ago
coverage Fix typo 6 months ago
cygwin MFLAGS for nmake 2 years ago
defs Suppress git error message 1 week ago
doc Promote did_you_mean to default gem 4 days ago
enc Update dependencies 2 weeks ago
ext ext/openssl/extconf.rb: check with -Werror=deprecated-declarations 15 hours ago
gems Promote did_you_mean to default gem 4 days ago
include Deprecate rb_eval_cmd, add rb_eval_cmd_kw 2 weeks ago
lib Do not start thread when `require 'drb/drb'` only 9 hours ago
libexec [bundler/bundler] Require relatively from exe/ when possible 3 months ago
man Use singleline/multiline instead of readline/reidline 2 weeks ago
misc lldb_cruby.py: improved dump of Symbol 1 week ago
missing Renamed assembly file like as e64f71f812324d098bed12ed68c2bc1d6e780c90 2 weeks ago
sample Remove unneeded exec bits from some files 3 weeks ago
spec Revert "Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)" 2 days ago
template load prelude.rb by builtin features. 3 weeks ago
test Detect started threads when require only 9 hours ago
tool MJIT_CC and MJIT_SUPPORT are not a prefix 18 hours ago
win32 Fix `$(RMALL) -r` on Windows 1 week ago
.dir-locals.el add .dir-locals.el [ci skip] 11 months ago
.document Rubified the APIs of pack.c 3 weeks ago
.editorconfig Remove duplicated and change order 8 months ago
.gdbinit Prefix global_symbols with `ruby_` 6 months ago
.gitattributes Add tool/leaked-globals to .gitattributes [ci skip] 4 months ago
.gitignore Check -1 arity for C++ 1 week ago
.indent.pro * .indent.pro: added for ruby-style. 9 years ago
.rspec_parallel Introduce test-bundler-parallel task. 3 months ago
.travis.yml Fix "cannot find the function: strcpy()" error on arm32 on Travis CI. (#2686) 19 hours ago
BSDL * BSDL: update copyright notice for 2013. 6 years ago
CONTRIBUTING.md [DOC] Please see _the_ official issue tracker... [ci skip] 5 years ago
COPYING COPYING: reformat as RDoc 10 months ago
COPYING.ja COPYING: reformat as RDoc 10 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 10 months ago
NEWS Remove e2mmap entries from docs 6 days 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
README.ja.md We're not using Azure Pipelines anymore 3 weeks ago
README.md We're not using Azure Pipelines anymore 3 weeks ago
SECURITY.md Add SECURITY.md [ci skip] 6 days ago
aclocal.m4 configure.ac: check finite,isinf,isnan as macros first 10 months ago
addr2line.c retrieve current path on macOS 3 months ago
addr2line.h Support Mach-O on backtrace with DWARF 1 year ago
appveyor.yml appveyor.yml - remove timezone & tzinfo gems from MSVC builds 1 month ago
array.c make functions static 2 weeks ago
ast.c Revert "Method reference operator" 3 weeks ago
ast.rb fix line break code (fix to LF) 4 weeks ago
bignum.c make functions static 2 weeks ago
builtin.c move rb_vm_lvar_exposed() correctly. 3 weeks ago
builtin.h try to remove vm_core.h 3 weeks ago
class.c Merged common statements [Bug #16242] 1 week ago
common.mk Add missing dependency 18 hours ago
compar.c Raise on end-exclusive ranges [Feature #14784] 1 month ago
compile.c compile.c: stop wrong peephole optimization when covearge is enabled 1 day ago
complex.c Improve consistency of bool/true/false 1 week ago
configure.ac Fixed the inverted condition 2 days ago
constant.h delete unused functions 3 weeks ago
cont.c Suppress strict-aliasing warning by x86_64-w64-mingw32-gcc 7.4.0 1 week ago
debug.c add additional CF info for CI env 19 hours ago
debug_counter.c Update dependencies 2 weeks ago
debug_counter.h add debug counters for vm_search_method_slowpath() 2 months ago
dir.c [DOC] Added File::FNM_SYSCASE example [Bug #16391] [ci skip] 1 day ago
dln.c Remove IA64 support. 5 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 5 years ago
dmyext.c dmyenc.c: separate 5 years ago
encindex.h encoding.c: rb_enc_find_index2 1 year ago
encoding.c Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
enum.c check interrupts at each frame pop timing. 6 days ago
enumerator.c Make Enumerator::Chain#each treat lambdas as lambda 2 days ago
error.c make functions static 2 weeks ago
eval.c Make prepending a refined module after inclusion not break refinements 1 week ago
eval_error.c Renamed ruby_finalize_{0,1} 3 months ago
eval_intern.h delete unused functions 3 weeks ago
eval_jump.c drop-in type check for rb_define_global_function 3 months ago
file.c Fixed stack overflow [Bug #16382] 3 days ago
gc.c add additional CF info for CI env 19 hours ago
gc.h Rename rb_gc_mark_no_pin -> rb_gc_mark_movable 3 months ago
gc.rb fix line break code (fix to LF) 3 weeks ago
gem_prelude.rb Do not call 'gem "did_you_mean"' for now 4 days ago
golf_prelude.rb golf_prelude.rb: suppress the redefining warning 5 months ago
goruby.c goruby.c: FD leak [ci skip] 2 years ago
hash.c Avoid unnecessary tzset() call 4 days ago
hrtime.h hrtime.h: fix typo in non-builtin overflow check 1 year ago
id_table.c Revert https://github.com/ruby/ruby/pull/2486 2 months ago
id_table.h Revert https://github.com/ruby/ruby/pull/2486 2 months ago
inits.c load prelude.rb by builtin features. 3 weeks ago
insns.def check interrupts at each frame pop timing. 6 days ago
internal.h Fixed stack overflow [Bug #16382] 3 days ago
io.c Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
io.rb Define IO#read/write_nonblock with builtins. 3 weeks ago
iseq.c make functions static 2 weeks ago
iseq.h make functions static 2 weeks ago
lex.c.blt keywords: shrink struct kwtable 1 year ago
load.c Fixed stack overflow [Bug #16382] 3 days 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 3 months ago
marshal.c Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
math.c make functions static 2 weeks ago
method.h make functions static 2 weeks ago
mini_builtin.c vm_invoke_builtin_delegate with start index. 2 weeks ago
miniinit.c support builtin features with Ruby and C. 4 weeks ago
mjit.c mjit.c: fix a mismatch of malloc'ed type 3 days ago
mjit.h Constified mjit_init 4 days ago
mjit_compile.c Add a proper cast to pass JIT tests on mswin. 2 weeks ago
mjit_worker.c Allow specifying arbitrary MJIT flags by --jit-debug 4 days ago
node.c Revert "Method reference operator" 3 weeks ago
node.h Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
numeric.c make functions static 2 weeks ago
object.c Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
pack.c Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
pack.rb Rubified the APIs of pack.c 3 weeks ago
parse.y parse.y: suppress "set but not used" warnings on ripper.y 18 hours ago
prelude.rb Define IO#read/write_nonblock with builtins. 3 weeks 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 Make {Method,UnboundMethod}#super_method handle clone/bind/unbind 2 days ago
process.c delete unused codes 2 weeks ago
random.c Adjusted spaces [ci skip] 2 months ago
range.c implement Range#count 1 day ago
rational.c Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
re.c Revert "Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)" 2 days 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 5 months ago
regexec.c Only define history_root member of the Oniguruma re_registers struct if USE_CAPTURE_HISTORY is enabled 7 months ago
regint.h Merge Onigmo 6.1.1 2 years ago
regparse.c st_foreach now free from ANYARGS 3 months ago
regparse.h Fix typos. 1 year ago
regsyntax.c Merge Onigmo 6.0.0 3 years ago
ruby-runner.c Fix warnings 3 months ago
ruby.c Allow specifying arbitrary MJIT flags by --jit-debug 4 days ago
ruby_assert.h respect NDEBUG. 4 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 Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
signal.c Deprecate rb_eval_cmd, add rb_eval_cmd_kw 2 weeks ago
siphash.c switch SipHash from SipHash24 to SipHash13 variant 2 years ago
siphash.h blacklist UBSAN's unsigned integer overflow 1 year ago
sparc.c configure.ac 2 years ago
sprintf.c Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
st.c st: Do error check only on non-Ruby 1 month ago
strftime.c Prefer `rb_fstring_lit` over `rb_fstring_cstr` 1 year ago
string.c Added Symbol#start_with? and Symbol#end_with? method. [Feature #16348] 1 week ago
struct.c Avoid needless object allocation 2 weeks ago
symbol.c delete unused functions 3 weeks ago
symbol.h Add RB_ID_SERIAL_MAX 7 months ago
thread.c move an interrupt point. 17 hours ago
thread_pthread.c rb_thread_create now free from ANYARGS 3 months ago
thread_pthread.h thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document 1 year ago
thread_sync.c add assertion for mutex_lock. 1 month ago
thread_win32.c Remove IA64 support. 5 months ago
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. 5 years ago
time.c fix typo 2 days ago
timev.h timev.h: dummy definition for TAGS 7 months ago
trace_point.rb Make TracePoint.stat a singleton method again (#2726) 22 hours ago
transcode.c Deprecate taint/trust and related methods, and make the methods no-ops 2 weeks ago
transcode_data.h transcode_data.h: missing cast 4 years ago
transient_heap.c rb_aligned_malloc can return NULL 1 month ago
transient_heap.h Add `GC.compact` again. 7 months ago
util.c Split dtoa.c 10 months ago
variable.c Do not lose existing constant visibility when autoloading 2 days ago
variable.h fastpath for ivar read of FL_EXIVAR objects. 1 week ago
version.c Provides ruby2_keywords 1 month ago
version.h * 2019-12-06 [ci skip] 9 hours ago
vm.c fix parameter 19 hours ago
vm_args.c vm_args.c: make the keyword deprecation message helpful 2 days ago
vm_backtrace.c Let the backtrace array constructed in backtrace_collect be initialized with the size already given 1 month ago
vm_core.h make functions static 2 weeks ago
vm_debug.h add rp() and bp() in internal.h. 3 months ago
vm_dump.c add additional CF info for CI env 19 hours ago
vm_eval.c Make rb_eval_string_wrap specify a cref so constant setting works correctly 23 hours ago
vm_exec.c vm_exec.c: reduced repeated same calls 1 year ago
vm_exec.h Fixed format specifiers 2 months ago
vm_insnhelper.c check interrupts at each frame pop timing. 6 days ago
vm_insnhelper.h Combine call info and cache to speed up method invocation 1 month ago
vm_method.c vm_method.c: add top-level ruby2_keywords 6 days ago
vm_opts.h Use cppflags to pass preprocessor options 1 month ago
vm_trace.c Renamed `load_*.inc` as `*.rbinc` to utilize a suffix rule 3 weeks ago
vsnprintf.c Use array indexing with considering clang's feeling 3 months ago

README.md

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