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 1408f15921 * 2019-08-20 [ci skip] 8 hours ago
.github/workflows Reduce sub-shell and use `&&` instead of `;` 13 hours ago
basictest colors file has been moved from test to tool 1 month ago
benchmark Close created files [ci skip] 1 week ago
bin Added binstub for racc executables. 2 months ago
bootstraptest Compare actual result 6 days ago
ccan ccan/list: sync with upstream 1 year ago
coroutine Add assertions to `coroutine_initialize_main`. 1 month ago
coverage Fix typo 3 months ago
cygwin MFLAGS for nmake 2 years ago
defs exit accepts true and false [ci skip] 3 days ago
doc Marked up command line options [ci skip] 4 days ago
enc Init function is need to link statically 1 week ago
ext Hoisted out unixsocket_len, triming NUL chars from sun_path 3 days ago
gems Update power_assert to 1.1.5 1 week ago
include Fix FL_USER19 17 hours ago
lib Update the canonical repository url 15 hours ago
libexec [bundler/bundler] Require relatively from exe/ when possible 1 day ago
man [bundler/bundler] Remove mention to remembered options 3 days ago
misc add FROZEN to lldb debug output 3 months ago
missing missing/memcmp.c: suppress a `-Wparentheses` warning 18 hours ago
sample Drop duplicated sample code (#2389) [ci skip] 14 hours ago
spec Skip open_spec.rb:L95 because ruby repo doesn't have json as default gems. 1 day ago
template test-bundled-gems-run: Respect -k option 3 weeks ago
test Make portable for standalone test-unit gem. 14 hours ago
tool Omit version.h when merging 17 hours ago
win32 * expand tabs. [ci skip] 18 hours ago
.dir-locals.el add .dir-locals.el [ci skip] 7 months ago
.document Include LEGAL in .document [ci skip] 8 months ago
.editorconfig Remove duplicated and change order 5 months ago
.gdbinit Prefix global_symbols with `ruby_` 3 months ago
.gitattributes Add tool/leaked-globals to .gitattributes [ci skip] 1 month ago
.gitignore Only ignore build directories. 2 months ago
.indent.pro * .indent.pro: added for ruby-style. 9 years ago
.travis.yml Mark Travis osx cron-only 14 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 6 months ago
COPYING.ja COPYING: reformat as RDoc 6 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 6 months ago
NEWS Minor wording fix in NEWS [ci skip] 1 week 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 Prefer master rather than trunk in README [ci skip] 1 month ago
README.md README: Add smart URL for joining mailing list 2 weeks ago
aclocal.m4 configure.ac: check finite,isinf,isnan as macros first 6 months ago
addr2line.c addr2line.c: clarify the type of integer expression 1 month ago
addr2line.h Support Mach-O on backtrace with DWARF 10 months ago
appveyor.yml Make AppVeyor notification colors consistent 23 hours ago
array.c Avoid confusion in Array#- and Array#difference docs (#2070) 4 days ago
ast.c Make it as clear as possible that RubyVM is MRI-specific and only exists on MRI (#2113) [ci skip] 18 hours ago
bignum.c * expand tabs. 2 weeks ago
class.c remove useless include and dependency 1 week ago
common.mk Prefer exact ITEM to benchmark 2 days ago
compar.c Clarify requirements of <=> 3 months ago
compile.c Switch to using a VM stack argument instead of 2nd operand for getconstant 5 days ago
complex.c Expanded f_quo 1 week ago
configure.ac crash report on mac little update 15 hours ago
constant.h Module#constant_source_location [Feature #10771] 1 month ago
cont.c cont.c: remove unused STACK_GROW_DIR_DETECTION 18 hours ago
debug.c internal.h: remove dependecy on ruby/io.h 1 year ago
debug_counter.c Add a way to print debug counters without exiting 1 week ago
debug_counter.h Add a way to print debug counters without exiting 1 week ago
dir.c dir.c (dir_each_entry): remove unnecessary check 1 month ago
dln.c Remove IA64 support. 2 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 4 years ago
dmyext.c dmyenc.c: separate 4 years ago
encindex.h encoding.c: rb_enc_find_index2 1 year ago
encoding.c Better wording for __ENCODING__ 2 weeks ago
enum.c Remove redundant each from `sum` example (#2190) [ci skip] 3 days ago
enumerator.c * expand tabs. 6 days ago
error.c Use modifier for pid_t 16 hours ago
eval.c Make it as clear as possible that RubyVM is MRI-specific and only exists on MRI (#2113) [ci skip] 18 hours ago
eval_error.c Renamed ruby_finalize_{0,1} 6 days ago
eval_intern.h solve "duplicate :raise event" [Bug #15877] 1 week ago
eval_jump.c * expand tabs. 6 days ago
file.c Do not always taint the result of File#path 2 weeks ago
gc.c Fix document of `GC.start` (#2382) 1 day ago
gc.h Rename rb_gc_mark_no_pin -> rb_gc_mark_movable 1 week ago
gem_prelude.rb Reduce system calls by activating the `did_you_mean` gem. 3 years ago
golf_prelude.rb golf_prelude.rb: suppress the redefining warning 1 month ago
goruby.c goruby.c: FD leak [ci skip] 2 years ago
hash.c hash.c: gc.h is needed when HASH_DEBUG mode 1 week ago
hrtime.h hrtime.h: fix typo in non-builtin overflow check 11 months ago
id_table.c Add `GC.compact` again. 4 months ago
id_table.h Add `GC.compact` again. 4 months ago
inits.c Explicitly initialise encodings on init to remove branches on encoding lookup 3 weeks ago
insns.def Switch to using a VM stack argument instead of 2nd operand for getconstant 5 days ago
internal.h Renamed ruby_finalize_{0,1} 6 days ago
io.c io.c: make ioctl_req_t int in Android 8 hours ago
iseq.c Make it as clear as possible that RubyVM is MRI-specific and only exists on MRI (#2113) [ci skip] 18 hours ago
iseq.h Add `GC.compact` again. 4 months ago
lex.c.blt keywords: shrink struct kwtable 1 year ago
load.c Omit a tag unless loading with a wrapper module 2 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 1 week ago
marshal.c Warn instance variable `E` 1 week ago
math.c math.c: adjust cbrt 1 year ago
method.h Stop packing rb_method_definition_t 4 weeks ago
miniinit.c miniinit.c: built-in encoding aliases 3 years ago
mjit.c Rename rb_gc_new_location to rb_gc_location 3 months ago
mjit.h Rename mjit_gc_finish_hook to mjit_gc_exit_hook 3 months ago
mjit_compile.c Just disable inlining with local varaible for now 1 month ago
mjit_worker.c Handle failure of opening a null device 1 month ago
node.c Let memory sizes of the various IMEMO object types be reflected correctly 3 weeks ago
node.h Let memory sizes of the various IMEMO object types be reflected correctly 3 weeks ago
numeric.c Expanded f_quo 1 week ago
object.c Fix doc in Object#respond_to_missing? (#2239) 4 days ago
pack.c Added some examples to the documentation for String#unpack1 because 1 week ago
parse.y Fix parsing of mutiple assignment with rescue modifier 1 week ago
prelude.rb Document that non-blocking mode isn't always supported on Windows [ci skip] 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 Add details about parameters to define_method doc (#2165) 4 days ago
process.c nil as the default of optional parameters 1 month ago
random.c * expand tabs. 2 months ago
range.c Make Range#=== operate like cover? instead of include? for string ranges 5 days ago
rational.c rb_numeric_quo: support Complex 1 week ago
re.c Reuse match data 3 weeks ago
regcomp.c Fix issues detected by code analysis tool (mainly Coverity). 11 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 Escape control codes in regexp warning message 1 month ago
regexec.c Only define history_root member of the Oniguruma re_registers struct if USE_CAPTURE_HISTORY is enabled 3 months ago
regint.h Merge Onigmo 6.1.1 2 years ago
regparse.c Fixed String#grapheme_clusters with wide encodings 1 month 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 8 months ago
ruby.c ruby.c (name_match_p): remove unnecessary condition 1 month ago
ruby_assert.h respect NDEBUG. 1 month 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 `$SAFE` as a process global state. [Feature #14250] 1 year ago
signal.c Renamed ruby_finalize_{0,1} 6 days ago
siphash.c switch SipHash from SipHash24 to SipHash13 variant 2 years ago
siphash.h blacklist UBSAN's unsigned integer overflow 9 months ago
sparc.c configure.ac 1 year ago
sprintf.c Add /* fall through */ comments 1 month ago
st.c Add `GC.compact` again. 4 months ago
strftime.c Prefer `rb_fstring_lit` over `rb_fstring_cstr` 10 months ago
string.c Fixed heap-use-after-free 4 days ago
struct.c Define Struct#deconstruct 4 months ago
symbol.c Prefix global_symbols with `ruby_` 3 months ago
symbol.h Add RB_ID_SERIAL_MAX 3 months ago
thread.c unsigned int should have enough bits for rb_thread_shield_waiting 16 hours ago
thread_pthread.c * expand tabs. 2 months ago
thread_pthread.h thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document 11 months ago
thread_sync.c do_mutex_lock: release mutex before checking for interrupts (fixes issue 15360) 2 months ago
thread_win32.c Remove IA64 support. 2 months ago
thread_win32.h * ext/openssl/depend: remove dependency from internal headers. 5 years ago
time.c Refine time_to_r 1 week ago
timev.h timev.h: dummy definition for TAGS 4 months ago
transcode.c transcode.c (rb_econv_open0): remove unused code 3 weeks ago
transcode_data.h transcode_data.h: missing cast 4 years ago
transient_heap.c prefix ASAN related inline functions asan_ 2 months ago
transient_heap.h Add `GC.compact` again. 4 months ago
util.c Split dtoa.c 6 months ago
variable.c Don't accidentally name anonymous module/class 5 days ago
version.c Update RDoc of RUBY_REVISION 2 months ago
version.h * 2019-08-20 [ci skip] 8 hours ago
vm.c Make it as clear as possible that RubyVM is MRI-specific and only exists on MRI (#2113) [ci skip] 18 hours ago
vm_args.c update Array's length correctly. 2 months ago
vm_backtrace.c * expand tabs. 2 weeks ago
vm_core.h Make VM_DEBUG_VERIFY_METHOD_CACHE derived from VMDEBUG 2 days ago
vm_debug.h add rp() and bp() in internal.h. 1 week ago
vm_dump.c crash report on mac little update 15 hours ago
vm_eval.c Improve the doc example of `method_missing` 2 days ago
vm_exec.c vm_exec.c: reduced repeated same calls 1 year ago
vm_exec.h use __GNUC__ instead of __GCC__. 5 months ago
vm_insnhelper.c Hoisted out search_refined_method 2 days ago
vm_insnhelper.h Initialize vm_throw_data::throw_state as int 3 weeks ago
vm_method.c Ensure non-OPT_GLOBAL_METHOD_CACHE code valid 2 days ago
vm_opts.h vm_opts.h: share USE_IC_FOR_IVAR as OPT_IC_FOR_IVAR 10 months ago
vm_trace.c Renamed ruby_finalize_{0,1} 6 days ago
vsnprintf.c give up sanitizing BSD_vfprintf 3 months ago
wercker.yml Generalize timeout_scale 2 months 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/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