MRI method JIT compiler based on original stack-based YARV instructions (Development Repository of ruby/ruby#1782, already merged)
Clone or download
Permalink
Failed to load latest commit information.
basictest basictest: --run-opt option Oct 19, 2016
benchmark Lazy Proc allocation for block parameters Oct 24, 2017
bin Postponing the Bundler merge. Dec 22, 2017
bootstraptest bootstraptest/test_fork.rb: Stop too restrict NPROC test temporarily Jan 9, 2018
ccan ccan/list/list.h: suppress unused argument warnings Sep 6, 2015
coverage fix a typo [ci skip] Sep 12, 2014
cygwin MFLAGS for nmake Feb 10, 2017
defs keywords: shrink struct kwtable Jan 21, 2018
doc [DOC] Refinements on modules are allowed Jan 30, 2018
enc Update dependencies Jan 13, 2018
ext ignore external library sources [ci skip] Jan 26, 2018
gems Update minitest-5.11.1 Jan 8, 2018
include mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
lib net/pop: make modified strings mutable Jan 30, 2018
man erb.1: add missing option in detailed description Oct 21, 2017
misc ruby-additional.el: shorten here-doc markers Oct 2, 2017
missing [ci skip] tabify Jan 20, 2018
sample sample/iseq_loader: use File.open instead of Kernel#open Jan 12, 2018
spec skip EINVAL on unsupported platform Jan 30, 2018
template Fix a typo. Jan 12, 2018
test ruby.c: make JIT options more conservative Jan 30, 2018
tool mjit_compile.inc.erb: don't apply opt_send dispatch Feb 4, 2018
win32 Makefile.in: fix wrong echo usage Feb 3, 2018
.document Exclude Changelog files from documentation. Sep 1, 2017
.editorconfig .editorconfig: Use spaces instead of tab except Makefiles Jan 25, 2018
.gdbinit .gdbinit (print_lineno): follow up changes in r61534, r61536 Jan 9, 2018
.gitattributes rename ruby-runner as bin/ruby Sep 15, 2017
.gitignore common.mk: install MJIT header Jan 30, 2018
.indent.pro * .indent.pro: added for ruby-style. Mar 11, 2010
.travis.yml ruby.c: make JIT options more conservative Jan 30, 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 gc.c: expand sorted pages Jun 22, 2017
LEGAL Postponing the Bundler merge. Dec 22, 2017
Makefile.in Makefile.in: fix wrong echo usage Feb 3, 2018
NEWS system_spec.rb: add RubySpec for r62025 Jan 24, 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 configure.ac Sep 29, 2017
README.md Modify git clone command Dec 13, 2017
aclocal.m4 Fix missing m4_include at r61982 Jan 21, 2018
addr2line.c Support C89 if possible Dec 18, 2017
addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite Mar 26, 2014
appveyor.yml Remove DevKit path, change zlib link Sep 27, 2017
array.c mjit_compile.inc.erb: generate opt_plus Jan 30, 2018
bignum.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
class.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
common.mk mjit_compile.c: inline Ruby method call setup again Feb 4, 2018
compar.c Comparable#clamp Aug 11, 2016
compile.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
complex.c force fixable Jan 30, 2018
configure.ac Fix duplicated HAVE_NAN Jan 27, 2018
constant.h use id_table for constant tables Dec 29, 2015
cont.c mjit.c: convert to soft tabs Jan 30, 2018
debug.c internal.h: remove dependecy on ruby/io.h Jan 9, 2018
debug_counter.c debug_counter.c: debug_counter_names [ci skip] Mar 10, 2017
debug_counter.h rename absolute_path to realpath internally and introduce pathobj. Jun 1, 2017
dir.c dir.c: Dir#each_child Jan 24, 2018
dln.c constified Jan 9, 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 * configure.in: add -Wsuggest-attribute=noreturn and suppress warnings. May 8, 2016
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 load.c: use fstring instead of OBJ_FREEZE Jan 24, 2018
enum.c INFINITY is float. That of double is HUGE_VAL. Jan 19, 2018
enumerator.c ruby/ruby.h: remove unnecessary exports from C-API Jan 24, 2018
error.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
eval.c mjit.c: merge MJIT infrastructure Jan 30, 2018
eval_error.c eval_error.c: reset in each line Jan 7, 2018
eval_intern.h eval_intern.h: duplicate check Jan 18, 2018
eval_jump.c `$SAFE` as a process global state. [Feature #14250] Dec 28, 2017
file.c ruby/ruby.h: remove unnecessary exports from C-API Jan 24, 2018
gc.c mjit_compile.c: introduce initial JIT compiler Jan 30, 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 Use `%i`-literal instead of array of symbols Sep 7, 2017
goruby.c goruby.c: FD leak [ci skip] Mar 9, 2017
hash.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
ia64.s * removed trailing spaces. Jun 9, 2012
id_table.c adjust styles [ci skip] May 10, 2017
id_table.h id_table.h: dummy sentinel Aug 6, 2016
inits.c vm.c: rename MJIT to RubyVM::MJIT Jan 30, 2018
insns.def mjit_compile.inc.erb: support opt_xxx_with Feb 3, 2018
internal.h mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
io.c process.c: add :exception option to Kernel.#system Jan 24, 2018
iseq.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
iseq.h there is no such thing like 0 in enum defined_type Jan 19, 2018
lex.c.blt keywords: shrink struct kwtable Jan 21, 2018
load.c load.c: use rb_warning directly Jan 20, 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 add missing/nan.c Jan 20, 2018
math.c INFINITY is float. That of double is HUGE_VAL. Jan 19, 2018
method.h method.h: VM_METHOD_TYPE_MINIMUM_BITS Jan 28, 2018
miniinit.c miniinit.c: built-in encoding aliases Dec 26, 2015
mjit.c mjit.c: fix warnings on MinGW Feb 3, 2018
mjit.h ruby.c: make JIT options more conservative Jan 30, 2018
mjit_compile.c mjit_compile.c: inline Ruby method call setup again Feb 4, 2018
node.c Fix typos. Jan 17, 2018
node.h node.c: Stop double meaning of NODE_FOR by introducing NODE_FOR_MASGN Jan 16, 2018
numeric.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
object.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
pack.c internal.h: remove dependecy on ruby/encoding.h Jan 9, 2018
parse.y parse.y (parser_append_options): shorter alias LOC Jan 28, 2018
prelude.rb prelude.rb: eliminate a private constant Jan 7, 2018
probes.d change lingering dtrace probe documentation from function- to method- May 30, 2015
probes_helper.h th->ec: dtrace Nov 7, 2017
proc.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
process.c ruby/ruby.h: remove unnecessary exports from C-API Jan 24, 2018
random.c Fix typos. Jan 17, 2018
range.c range.c: use rb_check_funcall Oct 25, 2017
rational.c force fixable Jan 30, 2018
re.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
regcomp.c Fix typos. Jan 18, 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 get rid of strcat Dec 26, 2016
regexec.c label as lvalue is a GCCism Jan 2, 2018
regint.h Merge Onigmo 6.1.1 Feb 11, 2017
regparse.c Fix typos. Jan 18, 2018
regparse.h Fix typos. Jan 18, 2018
regsyntax.c Merge Onigmo 6.0.0 Dec 10, 2016
ruby-runner.c ruby-runner.c: RUBYLIB Sep 24, 2017
ruby.c ruby.c: make JIT options more conservative Jan 30, 2018
ruby_assert.h string literal longer than 509 characters is a C99ism Jan 2, 2018
ruby_atomic.h statement experssion is a GCCism Jan 2, 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 sigill marked as NORETURN Jan 18, 2018
siphash.c switch SipHash from SipHash24 to SipHash13 variant Jan 20, 2017
siphash.h switch SipHash from SipHash24 to SipHash13 variant Jan 20, 2017
sparc.c configure.ac Sep 29, 2017
sprintf.c internal.h: remove dependecy on ruby/encoding.h Jan 9, 2018
st.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
strftime.c adjust styles [ci skip] May 10, 2017
string.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
struct.c marshal.c: allow marshalling keyword_init struct Jan 5, 2018
symbol.c internal.h: remove dependecy on ruby/encoding.h Jan 9, 2018
symbol.h Use HAVE_BUILTIN___BUILTIN_CONSTANT_P May 20, 2016
thread.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
thread_pthread.c mjit.c: convert to soft tabs Jan 30, 2018
thread_pthread.h * thread_pthread.c (register_ubf_list): renamed from Nov 30, 2015
thread_sync.c raise_closed_queue_error marked as NORETURN Jan 18, 2018
thread_win32.c mjit.c: convert to soft tabs Jan 30, 2018
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. May 14, 2014
time.c time.c (num_exact): use predefined IDs Jan 22, 2018
timev.h timev.h: just use "unsigned int" for bitfields Jan 16, 2018
transcode.c ruby/ruby.h: remove unnecessary exports from C-API Jan 24, 2018
transcode_data.h transcode_data.h: missing cast Aug 8, 2015
util.c define NO_LONG_LONG appropriately Jan 4, 2018
variable.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
version.c version.c: no exit in ruby_show_copyright Jan 7, 2016
version.h * 2018-01-30 Jan 29, 2018
vm.c vm.c: add some guards against consistency error Feb 3, 2018
vm_args.c vm_args.c: to_proc refinements Jan 24, 2018
vm_backtrace.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
vm_core.h mjit.c: merge MJIT infrastructure Jan 30, 2018
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END} Apr 5, 2013
vm_dump.c delete extra #undef [ci skip] Jan 3, 2018
vm_eval.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
vm_exec.c catch up recent changes for call threaded code VM. Oct 27, 2017
vm_exec.h mjit_compile.inc.erb: generate last insn Jan 31, 2018
vm_insnhelper.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
vm_insnhelper.h vm_exec.h: replace RESTORE_REGS and NEXT_INSN Jan 30, 2018
vm_method.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
vm_opts.h Remove "trace_instruction" compile option. Dec 24, 2017
vm_trace.c mjit_compile.c: introduce initial JIT compiler Jan 30, 2018
vsnprintf.c unused member May 23, 2017

README.md

Build Status Build 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://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatforms

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 Ruby distribution files can be found on the following FTP site:

ftp://ftp.ruby-lang.org/pub/ruby/

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 git://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 mailto: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.

mailto:matz@ruby-lang.org