Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The Ruby Programming Language

branch: trunk

variable.c (rb_ivar_set): remove unnecessary check

r47512 contains the proper fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
latest commit 02dade3b9e
normal authored
benchmark * benchmark/bm_app_lc_fizzbuzz.rb: should skip output on benchmark.
bin * bin/testrb: Removed. Forgot to remove in r45971.
bootstraptest test_fork.rb: wait signals
ccan ccan/container_of/container_of.h: avoid warning with -Wcast-qual
cygwin * cygwin/GNUmakefile.in (uncommon.mk): link *.res.o.
defs * defs/default_gems: change version definition file of rake.
doc * doc/keywords.rdoc: [DOC] Describe each keyword.
enc euckr-tbl.rb: euro and registered signs
ext * ext/win32ole/sample/excel2.rb: remove some commented-out code.
gems * gems/bundled_gems: Upgrade to test-unit-3.0.0 and minitest-5.4.0.
include rb_call_info_t: shrink to 96 bytes from 104 bytes on 64-bit
lib mkmf.rb: -I flags to $INCFLAGS
man man/ruby.1: spelling fix ("bellow" => "below") [ci-skip]
misc ruby-additional.el: change key
missing * missing/nextafter.c: Include ruby/missing.h.
nacl * nacl/nacl-config.rb: Use File.exist? instead of executable?
sample * lib/rinda/ring.rb: split executable code into sample directory.
spec * remove trailing spaces.
template fake.rb.in: use absolute path
test test_date.rb: nonsense assertion
tool * tool/make-snapshot (usage): X.Y means the head of a branch now.
win32 * win32/win32.c (cmdglob): use inline function.
.document * .document: Removed extra space
.editorconfig .editorconfig: new
.gdbinit .gdbinit (rp): dump T_SYMBOL
.gitignore * test/runner.rb: reporting test coverage for test-all with COVERAGE …
.indent.pro * .indent.pro: added for ruby-style.
.travis.yml .travis.yml: remove generated directories
BSDL * BSDL: update copyright notice for 2013.
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 * compile.c (rb_vm_addr2insn): rename to rb_vm_insn_addr2insn
GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
KNOWNBUGS.rb * test/ruby/test_method.rb (test_unlinked_method_entry_in_method_obje…
LEGAL * LEGAL: added license infomation of ccan files.
Makefile.in * Makefile.in (update-coverage): Remove a never executed line.
NEWS Describe about vfork().
README.EXT README.EXT: preliminary documentation for RB_GC_GUARD
README.EXT.ja make symbol conversion functions public
README.ja.md * README.md, README.ja.md: removed (wrong) mode setting for emacs.
README.md * README.md: fix slight grammatical error by @abwinkler999.
addr2line.c * addr2line.c (fill_lines): get base addrs in fill_lines to use it
addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite
array.c * gc.c: add incremental GC algorithm. [Feature #10137]
bignum.c add some documents [ci skip]
class.c * class.c: [DOC] mention about prepended modules.
common.mk * common.mk (encs enc trans libencs libenc libtrans): force to run
compar.c compar.c: use Module#to_s
compile.c * compile.c (rb_vm_addr2insn): rename to rb_vm_insn_addr2insn
complex.c provide backward compatibilities
configure.in configure.in: use ac_cv_func_vfork
constant.h variable: cleanup to use rb_const_lookup
cont.c rb_{thread,context,fiber}_struct: trivial packing
debug.c * gc.c: add incremental GC algorithm. [Feature #10137]
dir.c * configure.in (dirfd): Check function.
dln.c * symbian/*: removed Symbian support.
dln.h dln.c: extra arguments
dln_find.c dln_find.c: PATH_SEP
dmydln.c * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
dmyext.c no K&R style
encoding.c symbols instead of IDs
enum.c Move enum.one? documentation before the relevant method.
enumerator.c symbols instead of IDs
error.c Init functions don't need ID caches
eval.c string.c: move frozen_strings table to rb_vm_t
eval_error.c eval_error.c: quote unprintable
eval_intern.h eval_error.c: rb_print_inaccessible
eval_jump.c eval_intern.h: VAR_INITIALIZED
file.c add some documents [ci skip]
gc.c gc.c: preserve encoding
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 * gc.c: add incremental GC algorithm. [Feature #10137]
ia64.s * removed trailing spaces.
inits.c ext/rbconfig/sizeof: move to an extension library
insns.def insns.def: avoid type-punned pointer cast
internal.h * gc.c: add incremental GC algorithm. [Feature #10137]
io.c * configure.in: Use AC_FUNC_FORK.
iseq.c compile: translate iseq in-place
iseq.h compile: translate iseq in-place
lex.c.blt * defs/keywords (reserved_word): made inline function static.
load.c * parse.y: change Symbol <-> ID relationship to avoid
loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
localeinit.c localeinit.c: revert r46202
main.c * include/ruby/debug.h: introdudced.
marshal.c marshal.c: fix symlink index
math.c constify parameters
method.h gc.c (rb_free_m_tbl): mark function as static
miniinit.c ext/rbconfig/sizeof: move to an extension library
node.c node.h: extract NODE functions from gc.c
node.h node.h: extract NODE functions from gc.c
numeric.c * dir.c (glob_helper): use #ifdef instead of #if.
object.c * gc.c: add incremental GC algorithm. [Feature #10137]
pack.c pack.c: no nil.taint
parse.y parse.y: fix warning message
prelude.rb * prelude.rb: [DOC] Update Thread::exclusive docs by @stevenharman.
probes.d vm_method.c: add new ruby::method-cache-clear dtrace probe
probes_helper.h probes_helper.h (RUBY_DTRACE_HOOK): correct type for _id
proc.c vm_core.h (rb_env_t): use flexible array
process.c * process.c: PTHREAD_CANCEL_DISABLE is not defined on Android.
random.c random.c: fix casts
range.c range.c: unused function
rational.c provide backward compatibilities
re.c get rid of function calls in RSTRING_PTR
regcomp.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
regenc.c constify rb_encoding and OnigEncoding
regenc.h * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
regerror.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
regexec.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
regint.h UNALIGNED_WORD_ACCESS on ppc64
regparse.c * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
regparse.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
regsyntax.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
ruby.c ruby.c: reduce RARRAY_PTR_USE region
ruby_atomic.h iseq.c: potential memory leak
safe.c * include/ruby/intern.h,
signal.c * gc.c: remvoe ruby_disable_gc_stress and add ruby_disable_gc
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: fix condition
st.c UNALIGNED_WORD_ACCESS on ppc64
strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range.
string.c string.c: remove vm_core.h dependency [ruby-core:64627]
struct.c struct.c: no rb_class_real twice
symbol.c symbol.c (rb_intern_cstr_without_pindown): check dsymbol on return
symbol.h symbol.c: move macros
thread.c thread.c, vm_method.c: avoid inadvertent pin-down
thread_pthread.c * symbian/*: removed Symbian support.
thread_pthread.h thread_pthread: prefer rb_nativethread* types/functions
thread_win32.c thread_pthread.c: timer thread flag
thread_win32.h * ext/openssl/depend: remove dependency from internal headers.
time.c time.c: DATA_PTR is never NULL
timev.h configure.in, win32/Makefile.sub: PACKED_STRUCT with VC
transcode.c transcode.c: use string
transcode_data.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
util.c util.c: let getcwd allocate buffer
variable.c variable.c (rb_ivar_set): remove unnecessary check
version.c version.c: show malloc_conf
version.h * 2014-09-10
vm.c vm_core.h (rb_env_t): use flexible array
vm_backtrace.c constify parameters
vm_core.h rb_call_info_t: shrink to 96 bytes from 104 bytes on 64-bit
vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
vm_dump.c compile: translate iseq in-place
vm_eval.c * vm_eval.c: [DOC] Fix rdoc formatting of patch from [Bug #9551]
vm_exec.c * vm_exec.c: improve performance in ppc64 arch.
vm_exec.h * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
vm_insnhelper.c variable.c: check index overflow
vm_insnhelper.h vm_core.h: redefined_flag in rb_vm_t
vm_method.c vm_method.c (release_method_definition): use rb_free_method_entry
vm_opts.h fix minor code comment typos
vm_trace.c * process.c (rlimit_resource_type, rlimit_resource_value):
vsnprintf.c vsnprintf.c: fix string precision

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}/${PLATFOR M}
    • ${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}/${P LATFORM}
    • ${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.