Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A concerted effort to augment and enhance Ruby MRI documentation
Ruby C C++ HTML Bison Makefile Other
branch: trunk

This branch is 179 commits behind ruby:trunk

* 2015-04-25

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
latest commit f67703f84a
svn authored
Failed to load latest commit information.
benchmark * benchmark/bm_so_meteor_contest.rb: fix a typo.
bin * lib/rake/*: Gemify rake [fix GH-862][Feature #11025]
bootstraptest * string.c (str_discard): does not free for STR_NOFREE string.
ccan ccan/list/list.h: sync with ccan upstream
coverage fix a typo [ci skip]
cygwin stub.o: under win32
defs * ext/json/json.gemspec, lib/rdoc/rdoc.gemspec: added gemspec directly.
doc * doc/contributors.rdoc: fix a typo. Patch by @davydovanton
enc common.mk: make enc/trans
ext
gems * ext/json/*, test/json/*: Reverted r50231. Because it's not works with
include * win32/win32.c (rb_w32_{getc,putc}): removed. they are needed for old
lib * lib/delegate.rb: fix a typo.
man GC documentation update
misc Import ruby-electric.el version 2.2.3 from upstream
missing missing/setproctitle.c: Avoid invalidating argv[1], argv[2], etc. unt…
nacl
sample fix a typo in comment [ci skip]
spec * spec/default.mspec: use default configuration file name.
template
test vm_eval.c: allow symbols to instance_eval/exec
tool * tool/expand-config.rb: typo, too.
win32
.document * .document: removed needless entries.
.editorconfig .editorconfig: new
.gdbinit .gdbinit: T_IMEMO
.gitignore * .gitignore: ignored temporary file with git.
.indent.pro * .indent.pro: added for ruby-style.
.travis.yml * .travis.yml: enabled email notification.
BSDL
CONTRIBUTING.md [DOC] Please see _the_ official issue tracker... [ci skip]
COPYING * COPYING: change Ruby's License from a dual license with GPLv2
COPYING.ja Change encoding from EUC-JP to UTF-8. [Feature #5128]
ChangeLog revert r50336
GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
KNOWNBUGS.rb
LEGAL * LEGAL: added license infomation of ccan files.
Makefile.in Makefile.in: selectable configure
NEWS
README.EXT
README.EXT.ja README.EXT.ja: add redirect [ruby-core:68631]
README.ja.md
README.md
addr2line.c
addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite
array.c
bignum.c * doc/contributors.rdoc: fix a typo. Patch by @davydovanton
class.c
common.mk * common.mk: commit miss of r50357.
compar.c compar.c: variable name [ci skip]
compile.c vm_eval.c: simplify rb_iterate
complex.c
configure.in dir.c: getattrlist on OSX 10.5
constant.h constant.h: constant visibilities
cont.c * vm_args.c: protect value stack from calling other methods
debug.c
dir.c
dln.c Merges a patch form naclports.
dln.h dln.c: extra arguments
dln_find.c dln_find.c: define S_ISREG
dmydln.c * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
dmyenc.c
dmyext.c dmyenc.c: separate
encoding.c use rb_funcallv
enum.c
enumerator.c
error.c error.c: update builtin_types
eval.c
eval_error.c eval.c: static IDs
eval_intern.h
eval_jump.c eval.c: use the given thread
file.c * file.c (rb_f_test): Consider nsec for "=", "<" and ">" for "test"
gc.c
gc.h * gc.c: rename is_dying_object() to is_garbage_object().
gem_prelude.rb * ruby.c (process_options): revert r30549.
golf_prelude.rb * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
goruby.c goruby.c: suppress warning
hash.c hash.c: check env vars encoding
ia64.s * removed trailing spaces.
inits.c
insns.def * internal.h: define rb_cref_t and change to use it.
internal.h * internal.h (rb_execarg_parent_end): Declared.
io.c * internal.h (rb_execarg_parent_end): Declared.
iseq.c * iseq.c (iseq_mark): skip some marking if iseq->orig is available.
iseq.h
lex.c.blt * defs/keywords (reserved_word): made inline function static.
load.c * load.c: removed unused header file "node.h".
loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
localeinit.c
main.c * include/ruby/debug.h: introdudced.
marshal.c marshal.c: class name encoding
math.c * math.c (math_log1, math_log2, math_log10): refactoring
method.h * load.c: removed unused header file "node.h".
miniinit.c miniinit.c: minimum built-in encodings in miniruby
node.c * vm_insnhelper.c: use T_IMEMO to create SVAR.
node.h * internal.h, node.h: move a definition of `struct rb_global_entry'
numeric.c hash.c: same hash values with Float#hash
object.c * object.c (rb_obj_clone): do not touch age (FL_PROMOTED[01]) because
pack.c util.c: hexdigit
parse.y parse.y: null by syntax error
prelude.rb * prelude.rb: [DOC] Update Thread::exclusive docs by @stevenharman.
probes.d
probes_helper.h probes_helper.h (RUBY_DTRACE_HOOK): correct type for _id
proc.c
process.c
random.c random.c: fix handle to release
range.c use frozen string of symbols
rational.c * rational.c: removed commented-out code.
re.c use frozen string of symbols
regcomp.c
regenc.c * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544
regenc.h regenc.h: shrink PosixBracketEntryType
regerror.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
regexec.c uninitialized variable
regint.h * Avoid undefined behaviors found by gcc -fsanitize=undefined.
regparse.c
regparse.h * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544
regsyntax.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
ruby.c
ruby_atomic.h
safe.c safe.c: preserve encoding
signal.c
siphash.c UNALIGNED_WORD_ACCESS on ppc64
siphash.h * siphash.h: check configure macros before include newer headers.
sparc.c * sparc.c: Use __asm__ instead of asm for gcc.
sprintf.c sprintf.c: ruby specific functions
st.c
strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range.
string.c
struct.c * fix namespace issue on singleton class expressions. [Bug #10943]
symbol.c * load.c: removed unused header file "node.h".
symbol.h
thread.c thread.c: class name encoding
thread_pthread.c
thread_pthread.h
thread_win32.c * thread_pthread.c (native_set_thread_name): New function to
thread_win32.h * ext/openssl/depend: remove dependency from internal headers.
time.c
timev.h configure.in, win32/Makefile.sub: PACKED_STRUCT with VC
transcode.c use 0 for reserved
transcode_data.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
util.c util.c: hexdigit
variable.c variable.c: const_update
version.c version.c: support RUBY_ENGINE_VERSION
version.h
vm.c * vm.c (vm_exec): check other events when RETURN is thrown.
vm_args.c * remove trailing spaces.
vm_backtrace.c vm_backtrace.c: use rb_id2str
vm_core.h * vm_args.c: protect value stack from calling other methods
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
vm_dump.c
vm_eval.c vm_eval.c: allow symbols to instance_eval/exec
vm_exec.c
vm_exec.h
vm_insnhelper.c
vm_insnhelper.h
vm_method.c * internal.h: define rb_cref_t and change to use it.
vm_opts.h
vm_trace.c * vm_trace.c (rb_tracepoint_new): fix documentation.
vsnprintf.c

README.md

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(ex. class, method calls)
  • Advanced Object-Oriented features(ex. Mix-in, Singleton-method)
  • Operator Overloading
  • Exception Handling
  • Iterators and Closures
  • Garbage Collection
  • Dynamic Loading of Object files(on some architecture)
  • Highly Portable (works on many Unix-like/POSIX compatible platforms as well as Windows, Mac OS X, BeOS etc.) cf. http://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:

http://www.ruby-lang.org/en/downloads/

The Ruby distribution files can be found in 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 http://svn.ruby-lang.org/repos/ruby/trunk/ ruby

Or if you are using git then use the following command:

$ git clone git://github.com/ruby/ruby.git

There are some other branches under development. Try the following command and see the list of branches:

$ svn ls http://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:

http://www.ruby-lang.org/

Mailing list

There is a mailing list to talk about Ruby. To subscribe 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

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

  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. Run 'make install'

    This command will create following directories and install files onto 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 (http://www.ruby-lang.org/en/community/mailing-lists) or on websites like (http://stackoverflow.com).

Bug reports should be filed at http://bugs.ruby-lang.org

The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.

matz@ruby-lang.org

Something went wrong with that request. Please try again.