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.
Samuel Williams f607e43352 Transition root fiber into state FIBER_TERMINATED. 5 hours ago
basictest Prefer block_given? to iterator? 5 months ago
benchmark Improve benchmarks and tests for threads. 1 day ago
bin Added binstub for racc executables. 1 day ago
bootstraptest * remove trailing spaces, expand tabs. 1 day ago
ccan ccan/list: sync with upstream 1 year ago
coroutine Make COROUTINE_XMM_REGISTERS compile-time only too 1 month ago
coverage Fix typo 1 month ago
cygwin MFLAGS for nmake 2 years ago
defs Add pipeline operator [Feature #15799] 1 week ago
doc Added and update the racc entries on doc/*. 7 hours ago
enc remove Unicode 12.0.0 related directory and generated files 2 months ago
ext Remove IA64 support. 1 day ago
gems Update test-unit 1 month ago
include Remove IA64 support. 1 day ago
lib Removed needless file with the upstream repository. 7 hours ago
libexec Backport racc-1.4.15 from upstream. 1 day ago
man Merge bundler master from upstream. 1 week ago
misc add FROZEN to lldb debug output 1 month ago
missing Split procstat_vm.c 4 months ago
sample For this may be a syntax error (instead of LocalJumpError) in Ruby 2.7 4 months ago
spec Remove spec testing undefined behavior 19 hours ago
template Moved Makefile.in under template 1 week ago
test Restore $VERBOSE 5 hours ago
tool Update sync task for the directory structure of cparse and ignore JRuby files. 7 hours ago
win32 Remove IA64 support. 1 day ago
.dir-locals.el add .dir-locals.el [ci skip] 5 months ago
.document Include LEGAL in .document [ci skip] 6 months ago
.editorconfig Remove duplicated and change order 3 months ago
.gdbinit Prefix global_symbols with `ruby_` 1 month ago
.gitattributes Add tool/format-release to .gitattributes 1 month ago
.gitignore Ignore `/build*`. 1 day ago
.indent.pro * .indent.pro: added for ruby-style. 9 years ago
.travis.yml Update homebrew on Travis 1 day 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 4 months ago
COPYING.ja COPYING: reformat as RDoc 4 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 4 months ago
Makefile.in Dummy Makefile.in for CIs 1 week ago
NEWS Fix a typo [ci skip] 5 hours 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 * remove trailing spaces. [ci skip] 2 weeks ago
README.md * remove trailing spaces. [ci skip] 2 weeks ago
aclocal.m4 configure.ac: check finite,isinf,isnan as macros first 4 months ago
addr2line.c Suppress warnings by gcc 9.1 1 week ago
addr2line.h Support Mach-O on backtrace with DWARF 8 months ago
appveyor.yml Generalize timeout_scale 1 week ago
array.c add comments to mention sort.reverse! 1 week ago
ast.c ast.c: update inspect results in the documents 4 weeks ago
azure-pipelines.yml Now test-bundler is not working on macOS either 2 days ago
bignum.c [DOC] fix markups [ci skip] 3 months ago
class.c Eagerly name modules and classes 4 weeks ago
common.mk Remove IA64 support. 1 day ago
compar.c Clarify requirements of <=> 1 month ago
compile.c * expand tabs. 4 days ago
complex.c * expand tabs. 19 hours ago
configure.ac Remove IA64 support. 1 day ago
constant.h Add `GC.compact` again. 2 months ago
cont.c Transition root fiber into state FIBER_TERMINATED. 3 hours ago
debug.c internal.h: remove dependecy on ruby/io.h 1 year ago
debug_counter.c Add debug counter for MJIT stale_units 2 months ago
debug_counter.h Reduce ONIG_NREGION from 10 to 4: power of 2 and testing revealed most pattern matches are less than or equal to 4 results 1 month ago
dir.c [DOC] fix markups [ci skip] 3 months ago
dln.c Remove IA64 support. 1 day 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 11 months ago
dmyenc.c load.c: tweak the return value 4 years ago
dmyext.c dmyenc.c: separate 4 years ago
encindex.h encoding.c: rb_enc_find_index2 1 year ago
encoding.c [DOC] fix markups [ci skip] 3 months ago
enum.c squeeze space [ci skip] 1 week ago
enumerator.c [DOC] Improve documentation for Enumerator::Lazy 1 month ago
error.c * expand tabs. 1 week ago
eval.c Include inspect value of object in FrozenError messages 2 weeks ago
eval_error.c eval_error.c: should not escapce newline and tab 4 months ago
eval_intern.h Use UNALIGNED_MEMBER_PTR 2 weeks ago
eval_jump.c `$SAFE` as a process global state. [Feature #14250] 1 year ago
file.c Update documentation for File.executable{,_real}? to mention Windows issues 2 days ago
gc.c Adjust indent 1 day ago
gc.h don't need to sweep rest. 1 month ago
gem_prelude.rb Reduce system calls by activating the `did_you_mean` gem. 3 years ago
golf_prelude.rb added `f` for 1 byte FizzBuzz because Hexagony has such feature 1 year ago
goruby.c goruby.c: FD leak [ci skip] 2 years ago
hash.c hash.c (rb_hash_s_create): Reject `Hash[[nil]]` 4 weeks ago
hrtime.h hrtime.h: fix typo in non-builtin overflow check 9 months ago
id_table.c Add `GC.compact` again. 2 months ago
id_table.h Add `GC.compact` again. 2 months ago
inits.c Defer setting gc_stress until inits done 1 month ago
insns.def add definemethod/definesmethod insn. 2 months ago
internal.h Make opt_aref instruction support Integer#[] 2 weeks ago
io.c IO#set_encoding_by_bom 1 week ago
iseq.c Use UNALIGNED_MEMBER_PTR 2 weeks ago
iseq.h Add `GC.compact` again. 2 months ago
lex.c.blt keywords: shrink struct kwtable 1 year ago
load.c [DOC] fix markups [ci skip] 3 months 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: RUBY_DEBUG_ENV in devel 2 years ago
marshal.c Marshal distant past/future 1 day ago
math.c math.c: adjust cbrt 1 year ago
method.h STATIC_ASSERT for VM_METHOD_TYPE_MINIMUM_BITS 2 weeks ago
miniinit.c miniinit.c: built-in encoding aliases 3 years ago
mjit.c Rename rb_gc_new_location to rb_gc_location 1 month ago
mjit.h Rename mjit_gc_finish_hook to mjit_gc_exit_hook 1 month ago
mjit_compile.c Revert "Try dropping const qualifier to suppress msiwn warning" 2 months ago
mjit_worker.c Do not use rb_iseq_path() while moving ISeq pointers 3 weeks ago
node.c Fix grammar of macro name: ECCESSED -> ECCESSIVE 2 weeks ago
node.h Fix grammar of macro name: ECCESSED -> ECCESSIVE 2 weeks ago
numeric.c Make opt_aref instruction support Integer#[] 2 weeks ago
object.c remove 2 redundant calls to rb_str_dup 1 week ago
pack.c [DOC] fix markups [ci skip] 2 months ago
parse.y Fix wrong "void value expression" error 3 days ago
prelude.rb Fix typos, grammar, and style 1 month 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 * expand tabs. 1 week ago
process.c process.c: [DOC] remove extra quotes [ci skip] 2 months ago
random.c * expand tabs. 2 weeks ago
range.c range.c (inspect_range): omit beginless "nil" 4 weeks ago
rational.c No TypeError at nil if exception: false 5 months ago
re.c Remove member char_offset_updated from struct rmatch as member char_offset_num_allocated can serve the same purpose as that predicate 1 month ago
regcomp.c Fix issues detected by code analysis tool (mainly Coverity). 9 months 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 regerror.c: lenghten MAX_ERROR_PAR_LEN to contain old property names 8 months ago
regexec.c Only define history_root member of the Oniguruma re_registers struct if USE_CAPTURE_HISTORY is enabled 1 month ago
regint.h Merge Onigmo 6.1.1 2 years ago
regparse.c convert check for array length to assertion and comment out 6 months ago
regparse.h Fix typos. 1 year ago
regsyntax.c Merge Onigmo 6.0.0 2 years ago
ruby-runner.c Give the MJIT header path name 6 months ago
ruby.c * expand tabs. 2 weeks ago
ruby_assert.h string literal longer than 509 characters is a C99ism 1 year ago
ruby_atomic.h move atomic logic from mjit.c from ruby_atomic.h 10 months ago
rubystub.c rubystub.c: sys/param.h for MAXPATHLEN 2 years ago
safe.c `$SAFE` as a process global state. [Feature #14250] 1 year ago
signal.c [DOC] fix markups [ci skip] 2 months ago
siphash.c switch SipHash from SipHash24 to SipHash13 variant 2 years ago
siphash.h blacklist UBSAN's unsigned integer overflow 7 months ago
sparc.c configure.ac 1 year ago
sprintf.c sprintf.c: fix typo 1 year ago
st.c Add `GC.compact` again. 2 months ago
strftime.c Prefer `rb_fstring_lit` over `rb_fstring_cstr` 8 months ago
string.c New buffer for shared string 1 day ago
struct.c Define Struct#deconstruct 2 months ago
symbol.c Prefix global_symbols with `ruby_` 1 month ago
symbol.h Add RB_ID_SERIAL_MAX 1 month ago
thread.c Transition root fiber into state FIBER_TERMINATED. 3 hours ago
thread_pthread.c * expand tabs. 1 day ago
thread_pthread.h thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document 9 months ago
thread_sync.c do_mutex_lock: release mutex before checking for interrupts (fixes issue 15360) 1 week ago
thread_win32.c Remove IA64 support. 1 day ago
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. 5 years ago
time.c Marshal distant past/future 1 day ago
timev.h timev.h: dummy definition for TAGS 2 months ago
transcode.c Prefer rb_check_arity when 0 or 1 arguments 6 months ago
transcode_data.h transcode_data.h: missing cast 3 years ago
transient_heap.c prefix ASAN related inline functions asan_ 4 weeks ago
transient_heap.h Add `GC.compact` again. 2 months ago
util.c Split dtoa.c 4 months ago
variable.c Add compaction support for more types. 1 week ago
version.c Update RDoc of RUBY_REVISION 2 weeks ago
version.h * 2019-06-20 19 hours ago
vm.c Ensure that vm_stack is cleared in `thread_cleanup_func_before_exec`. 9 hours ago
vm_args.c update Array's length correctly. 4 weeks ago
vm_backtrace.c Handle (empty) backtrace when thread is not born yet. 1 day ago
vm_core.h Ensure that vm_stack is cleared in `thread_cleanup_func_before_exec`. 9 hours ago
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} 6 years ago
vm_dump.c Remove IA64 support. 1 day ago
vm_eval.c Use UNALIGNED_MEMBER_PTR 2 weeks ago
vm_exec.c vm_exec.c: reduced repeated same calls 1 year ago
vm_exec.h use __GNUC__ instead of __GCC__. 3 months ago
vm_insnhelper.c Fix SystemStackError when calling a method in an unused refinement 1 week ago
vm_insnhelper.h Share vm_call_iseq_optimizable_p to reduce copy-paste 3 months ago
vm_method.c * expand tabs. 2 months ago
vm_opts.h vm_opts.h: share USE_IC_FOR_IVAR as OPT_IC_FOR_IVAR 8 months ago
vm_trace.c Suppress warnings by gcc 9.1 1 week ago
vsnprintf.c give up sanitizing BSD_vfprintf 1 month ago
wercker.yml Generalize timeout_scale 1 week ago

README.md

Build Status wercker status 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/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/

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