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.
aycabta 6df8cfb771 Omit test_using_quoting_detection_proc_with_multibyte_input temporarily for random order test 1 hour ago
.github Use `brew upgrade` instead of `brew update` 1 week ago
basictest Fixed misspellings 2 months ago
benchmark Improve `String#slice!` performance 4 weeks ago
bin Removed the old executables of racc 1 month ago
bootstraptest Make yield in singleton class definitions in methods a SyntaxError 2 weeks ago
ccan Fix typos [ci skip] 4 months ago
coroutine function pointers are not void* 3 weeks ago
coverage Fix typo 9 months ago
cygwin MFLAGS for nmake 3 years ago
defs config.status should be newer than config.cache if exists 1 month ago
doc Add pattern matching documentation 4 days ago
enc more on NULL versus functions. 3 weeks ago
ext Merge racc from upstream repository. 1 day ago
gems Update bundled gems 4 days ago
include kill USE_RGENGC=0 2 days ago
internal Introduce disposable call-cache. 6 days ago
lib Merge racc from upstream repository. 1 day ago
libexec Removed the old executables of racc 1 month ago
man Merge bundler-2.1.4 1 month ago
misc Fixed misspellings 2 months ago
missing internal/stdbool.h rework 2 months ago
sample Fixed misspellings 2 months ago
spec Remove support for passing nil to IO#ungetc 17 hours ago
template add predefined macros for Doxygen 3 weeks ago
test Omit test_using_quoting_detection_proc_with_multibyte_input temporarily for random order test 1 hour ago
tool respect --test-order=random 3 hours ago
win32 avoid defining inline 1 week ago
.dir-locals.el emacs mode addition 3 weeks ago
.document Add array.rb to .document 2 weeks ago
.editorconfig Remove duplicated and change order 11 months ago
.gdbinit Redmine /projects/ruby-trunk is now redirected 1 month ago
.gitattributes Add tool/leaked-globals to .gitattributes [ci skip] 7 months ago
.gitignore ignore revision.tmp with in-place build 2 weeks ago
.rspec_parallel Introduce test-bundler-parallel task. 6 months ago
.travis.yml Run specs on Ruby 2.7 too to make sure they keep passing 1 month ago
BSDL [ruby/irb] Reformat LICENSE.txt [ci skip] 3 weeks ago
CONTRIBUTING.md [DOC] Please see _the_ official issue tracker... [ci skip] 5 years ago
COPYING COPYING: reformat as RDoc 1 year ago
COPYING.ja COPYING: reformat as RDoc 1 year 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 1 year ago
NEWS.md `Proc` made by `Symbol#to_proc` should be a lambda [Bug #16260] 1 week ago
README.EXT README.EXT: add redirect [ruby-core:68631] 5 years ago
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631] 4 years ago
README.ja.md README*.md: `defines.h` moved [ci skip] 3 weeks ago
README.md README*.md: `defines.h` moved [ci skip] 3 weeks ago
aclocal.m4 configure.ac: check finite,isinf,isnan as macros first 1 year ago
addr2line.c internal/stdbool.h rework 2 months ago
addr2line.h Support Mach-O on backtrace with DWARF 1 year ago
appveyor.yml Remove code to prevent double build on trunk 1 month ago
array.c Document that Array#index and find_index are aliases [ci skip] 2 days ago
array.rb Removed useless shebang and executable bit [ci skip] 3 weeks ago
ast.c Separate builtin initialization calls 2 months ago
ast.rb Fix variable name and add more example [ci skip] 1 month ago
bignum.c Clarified documentation in rb_integer_unpack [ci skip] 2 weeks ago
builtin.c take care of USE_LAZY_LOAD=1. 2 months ago
builtin.h readable function names for inline functions. 2 months ago
class.c Make Module#include affect the iclasses of the module 16 hours ago
common.mk Share extracted bundled gems with gems for bundler 3 days ago
compar.c decouple internal.h headers 2 months ago
compile.c CI can be NULL. 6 days ago
complex.c decouple internal.h headers 2 months ago
configure.ac Prefer alignas() over _Alignas() 1 week ago
constant.h decouple internal.h headers 2 months ago
cont.c Let execution context local storage be an ID table 1 month ago
debug.c VALUE size packed callinfo (ci). 6 days ago
debug_counter.c add debug_counter access functions. 2 months ago
debug_counter.h Introduce disposable call-cache. 6 days ago
dir.c more on NULL versus functions. 3 weeks ago
dln.c more on NULL versus functions. 3 weeks ago
dln.h decouple internal.h headers 2 months 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 decouple internal.h headers 2 months ago
encoding.c Get rid of warnings/exceptions at cleanup 2 weeks ago
enum.c decouple internal.h headers 2 months ago
enumerator.c Removed duplicated code 2 weeks ago
error.c Added rb_warn_deprecated_to_remove 1 month ago
eval.c Introduce disposable call-cache. 6 days ago
eval_error.c Renamed ruby_finalize_{0,1} 6 months ago
eval_intern.h Create backtrace location array directly 2 months ago
eval_jump.c drop-in type check for rb_define_global_function 6 months ago
file.c decouple internal.h headers 2 months ago
gc.c kill USE_RGENGC=0 2 days ago
gc.h Rename RUBY_MARK_NO_PIN_UNLESS_NULL to RUBY_MARK_MOVABLE_UNLESS_NULL 1 month ago
gc.rb Fix call-seq of GC.verify_compaction_references [ci skip] 1 month ago
gem_prelude.rb Do not call 'gem "did_you_mean"' for now 2 months ago
golf_prelude.rb golf_prelude.rb: suppress the redefining warning 8 months ago
goruby.c goruby.c: FD leak [ci skip] 3 years ago
hash.c hash.c: [DOC] fix examples for ENV.merge! 5 days ago
hrtime.h hrtime.h: fix typo in non-builtin overflow check 1 year ago
id_table.c Introduce disposable call-cache. 6 days ago
id_table.h decouple internal.h headers 2 months ago
inits.c Moved Array#shuffle and Array#shuffle! to rbinc 1 month ago
insns.def Introduce disposable call-cache. 6 days ago
internal.h use RUBY_FUNCTION_NAME_STRING instead of __func__ for rp() 6 days ago
io.c Remove support for passing nil to IO#ungetc 17 hours ago
io.rb Define IO#read/write_nonblock with builtins. 3 months ago
iseq.c Eliminate unnecessary mjit_iseq_cc_entries calls 2 days ago
iseq.h VALUE size packed callinfo (ci). 6 days ago
lex.c.blt keywords: shrink struct kwtable 2 years ago
load.c Add the loaded feature after no exception raised 3 weeks ago
loadpath.c -Wno-overlength-strings 2 years ago
localeinit.c internal.h: remove dependecy on ruby/encoding.h 2 years ago
main.c main.c: Add doxygen mainpage 6 months ago
marshal.c marshal.c: Support dump and load of a Hash with the ruby2_keywords flag 1 month ago
math.c decouple internal.h headers 2 months ago
method.h Introduce disposable call-cache. 6 days ago
mini_builtin.c decouple internal.h headers 2 months ago
miniinit.c support builtin features with Ruby and C. 3 months ago
mjit.c Internalize rb_mjit_unit definition again 2 days ago
mjit.h Internalize rb_mjit_unit definition again 2 days ago
mjit_compile.c Internalize rb_mjit_unit definition again 2 days ago
mjit_worker.c Add missing free on cc_entries 2 days ago
node.c decouple internal.h headers 2 months ago
node.h Deprecate taint/trust and related methods, and make the methods no-ops 3 months ago
numeric.c Check the encoding of `half:` option 1 month ago
object.c [DOC] fixed line numbers [ci skip] 1 month ago
pack.c Separate builtin initialization calls 2 months ago
pack.rb Rubified the APIs of pack.c 3 months ago
parse.y Fixed duplicated warning 2 weeks ago
prelude.rb Define IO#read/write_nonblock with builtins. 3 months ago
probes.d change lingering dtrace probe documentation from function- to method- 4 years ago
probes_helper.h internal/vm.h rework 2 months ago
proc.c Proc from Symbol needs a receiver 6 days ago
process.c Fixed a potential memory leak 2 weeks ago
random.c Ensure seed data to be cleared 1 month ago
range.c more on NULL versus functions. 3 weeks ago
rational.c rb_rational_raw: convert num and den by to_int 1 month ago
re.c `Regexp` in `MatchData` can be `nil` 1 month ago
regcomp.c Fix issues detected by code analysis tool (mainly Coverity). 1 year ago
regenc.c Merge Onigmo 6.1.1 3 years ago
regenc.h initializer paren-string `{("str")}` is a C99ism 2 years ago
regerror.c Escape control codes in regexp warning message 8 months ago
regexec.c Only define history_root member of the Oniguruma re_registers struct if USE_CAPTURE_HISTORY is enabled 10 months ago
regint.h Merge Onigmo 6.1.1 3 years ago
regparse.c Fixed misspellings 2 months ago
regparse.h Fix typos. 2 years ago
regsyntax.c Merge Onigmo 6.0.0 3 years ago
ruby-runner.c Revert "Prefer `exe/ruby` to execute from it" 5 days ago
ruby.c io.c, ruby.c: include internal/variable.h for rb_gvar_readonly_setter 1 month ago
ruby_assert.h respect NDEBUG. 7 months ago
ruby_atomic.h fine-grained #ifdef guard for Sparc systems 3 weeks ago
rubystub.c rubystub.c: sys/param.h for MAXPATHLEN 3 years ago
signal.c decouple internal.h headers 2 months ago
siphash.c switch SipHash from SipHash24 to SipHash13 variant 3 years ago
siphash.h blacklist UBSAN's unsigned integer overflow 1 year ago
sparc.c configure.ac 2 years ago
sprintf.c Make temporary lock string encoding free 2 weeks ago
st.c st.c: remove variables that are no longer used 1 day ago
strftime.c decouple internal.h headers 2 months ago
string.c Warn non-nil `$/` [Feature #14240] 5 days ago
struct.c decouple internal.h headers 2 months ago
symbol.c decouple internal.h headers 2 months ago
symbol.h decouple internal.h headers 2 months ago
thread.c fix arity mismatch 1 week ago
thread_pthread.c more on NULL versus functions. 3 weeks ago
thread_pthread.h thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document 1 year ago
thread_sync.c more on NULL versus functions. 3 weeks ago
thread_win32.c Remove IA64 support. 8 months ago
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. 5 years ago
time.c Update docs for Time#at method [ci skip] 1 day ago
timev.h decouple internal.h headers 2 months ago
trace_point.rb Fix output of example [ci skip] 1 month ago
transcode.c Fixed symbol misused as ID 4 days ago
transcode_data.h transcode_data.h: missing cast 4 years ago
transient_heap.c decouple internal.h headers 2 months ago
transient_heap.h Add `GC.compact` again. 10 months ago
util.c decouple internal.h headers 2 months ago
variable.c Workaround of instance variable on hidden object 2 weeks ago
variable.h fastpath for ivar read of FL_EXIVAR objects. 3 months ago
version.c Provides ruby2_keywords 4 months ago
version.h * 2020-02-28 [ci skip] 17 hours ago
vm.c Introduce disposable call-cache. 6 days ago
vm_args.c Proc from Symbol needs a receiver 6 days ago
vm_backtrace.c decouple internal.h headers 2 months ago
vm_callinfo.h * remove trailing spaces. [ci skip] 6 days ago
vm_core.h Introduce disposable call-cache. 6 days ago
vm_debug.h add rp() and bp() in internal.h. 6 months ago
vm_dump.c Introduce disposable call-cache. 6 days ago
vm_eval.c Introduce disposable call-cache. 6 days ago
vm_exec.c Add VM insns counter like debug_counter (#2789) 2 months ago
vm_exec.h Add VM insns counter like debug_counter (#2789) 2 months ago
vm_insnhelper.c check imemo_type 1 day ago
vm_insnhelper.h Introduce disposable call-cache. 6 days ago
vm_method.c Introduce disposable call-cache. 6 days ago
vm_opts.h Use cppflags to pass preprocessor options 4 months ago
vm_trace.c rb_vm_t::postponed_job_index shall be rb_atomic_t 3 weeks ago
vsnprintf.c Use array indexing with considering clang's feeling 6 months ago
warning.rb Fix a typo [ci skip] 1 month ago

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