Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The Ruby Programming Language

branch: trunk

enum.c: fix condition to recycle block argument

* enum.c (dont_recycle_block_arg): fix condition to recycle block
  argument.  lambda with rest can get internal array directly.
  [ruby-core:62060] [Bug #9749]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
latest commit 118838ad3a
Nobuyoshi Nakada nobu authored
Octocat-spinner-32 benchmark st.c: use power-of-two sizes to avoid slow modulo ops
Octocat-spinner-32 bin * NEWS (with all sufficient information):
Octocat-spinner-32 bootstraptest FreeBSD 10 SEGVs this less than 4M + 12K bytes.
Octocat-spinner-32 cygwin * cygwin/GNUmakefile.in (uncommon.mk): link *.res.o.
Octocat-spinner-32 defs defs/gmake.mk: no _FORTIFY_SOURCE unless optimization
Octocat-spinner-32 doc * doc/syntax/assignment.rdoc: [DOC] Fix typo unclosed HTML tag by @an…
Octocat-spinner-32 enc unused functions and variables
Octocat-spinner-32 ext ossl_pkey.c: fix memory leak
Octocat-spinner-32 include * include/ruby/win32.h (rb_w32_cmdvector): removed.
Octocat-spinner-32 lib * lib/net/ftp.rb (Net::FTP#login): [DOC] The default password for
Octocat-spinner-32 man ruby.c: remove mangled_path
Octocat-spinner-32 misc rdoc-mode.el: fill indented block
Octocat-spinner-32 missing fix typos. Patch by k_takata.
Octocat-spinner-32 nacl fix typos. Patch by k_takata.
Octocat-spinner-32 sample * remove trailing spaces, append newline at EOF.
Octocat-spinner-32 spec * spec/default.mspec: expand relative path for ruby_exe which uses
Octocat-spinner-32 symbian Added HAVE_LABS and HAVE_LLABS to config.h
Octocat-spinner-32 template * parse.y: support Symbol GC. [ruby-trunk Feature #9634]
Octocat-spinner-32 test enum.c: fix condition to recycle block argument
Octocat-spinner-32 tool fix the example of failed URI
Octocat-spinner-32 win32 win32.c: CharNextExA with cp
Octocat-spinner-32 .document * .document: Removed extra space
Octocat-spinner-32 .editorconfig .editorconfig: new
Octocat-spinner-32 .gdbinit .gdbinit (rp): dump T_SYMBOL
Octocat-spinner-32 .gitignore .gitignore: ignore benchmark files
Octocat-spinner-32 .indent.pro * .indent.pro: added for ruby-style.
Octocat-spinner-32 .travis.yml * .travis.yml: Rebuild Travis CI's "ruby-head" version on successful
Octocat-spinner-32 BSDL * backport r39167 from trunk. [ruby-core:52059] [Bug #7812]
Octocat-spinner-32 COPYING * COPYING: change Ruby's License from a dual license with GPLv2
Octocat-spinner-32 COPYING.ja Change encoding from EUC-JP to UTF-8. [Feature #5128]
Octocat-spinner-32 ChangeLog enum.c: fix condition to recycle block argument
Octocat-spinner-32 GPL * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
Octocat-spinner-32 KNOWNBUGS.rb [Backport #7624]
Octocat-spinner-32 LEGAL * remove trailing spaces.
Octocat-spinner-32 Makefile.in * common.mk: Unused target, $(MKMAIN_CMD), removed.
Octocat-spinner-32 NEWS * lib/matrix.rb: Add Matrix#cofactor [fix GH-568]
Octocat-spinner-32 README.EXT * README.EXT: fix typo.
Octocat-spinner-32 README.EXT.ja * README.EXT: fix typo.
Octocat-spinner-32 README.ja.md * README.md, README.ja.md: removed (wrong) mode setting for emacs.
Octocat-spinner-32 README.md * README.md, README.ja.md: removed (wrong) mode setting for emacs.
Octocat-spinner-32 addr2line.c * addr2line.c (fill_lines): get base addrs in fill_lines to use it
Octocat-spinner-32 addr2line.h * addr2line.c (fill_lines): loop reverse order not to overwrite
Octocat-spinner-32 array.c * array.c (ARY_SET): added.
Octocat-spinner-32 bignum.c * bignum.c (SIZEOF_BDIGIT): Renamed from SIZEOF_BDIGITS.
Octocat-spinner-32 class.c class.c: check for malloc failures
Octocat-spinner-32 common.mk * common.mk: Unused target, $(MKMAIN_CMD), removed.
Octocat-spinner-32 compar.c * compar.c (cmp_equal): warn for this release and still rescue
Octocat-spinner-32 compile.c compile.c: use correct key for block when loading serialized iseqs
Octocat-spinner-32 complex.c * complax.c: [DOC] Document number conversion of `nil` by @skade [fix G…
Octocat-spinner-32 configure.in configure.in: no __builtin_setjmp on x64-mingw
Octocat-spinner-32 constant.h constant.h: reduce rb_const_entry_t size on 64-bit
Octocat-spinner-32 cont.c eval_intern.h: VAR_INITIALIZED
Octocat-spinner-32 debug.c * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.
Octocat-spinner-32 dir.c dir.c (dir_s_glob): RB_GC_GUARD instead of volatile
Octocat-spinner-32 dln.c dln.c: non-ascii path on Windows
Octocat-spinner-32 dln.h dln.c: extra arguments
Octocat-spinner-32 dln_find.c dln_find.c: PATH_SEP
Octocat-spinner-32 dmydln.c * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
Octocat-spinner-32 dmyext.c no K&R style
Octocat-spinner-32 encoding.c encoding.c: fix rdoc of `__FILE__`
Octocat-spinner-32 enum.c enum.c: fix condition to recycle block argument
Octocat-spinner-32 enumerator.c * enumerator.c (enumerator_block_call): use PARRAY_CONST_PTR()
Octocat-spinner-32 error.c error.c: Crash Report log
Octocat-spinner-32 eval.c * include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance):
Octocat-spinner-32 eval_error.c * eval_error.c (warn_printf): use rb_vsprintf instead so ruby specific
Octocat-spinner-32 eval_intern.h eval_intern.h: VAR_INITIALIZED
Octocat-spinner-32 eval_jump.c eval_intern.h: VAR_INITIALIZED
Octocat-spinner-32 file.c * file.c: [DOC] Add more documentation for File.basename by @avdi [fix
Octocat-spinner-32 gc.c gc.c: no newline to rb_bug
Octocat-spinner-32 gc.h * gc.c, gc.h (rb_objspace_each_objects_without_setup):
Octocat-spinner-32 gem_prelude.rb * ruby.c (process_options): revert r30549.
Octocat-spinner-32 golf_prelude.rb * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
Octocat-spinner-32 goruby.c * goruby.c (init_golf): append suffix.
Octocat-spinner-32 hash.c hash.c: use ID_SCOPE_SHIFT
Octocat-spinner-32 ia64.s * removed trailing spaces.
Octocat-spinner-32 inits.c * vm_trace.c: separate trace_func related functions from
Octocat-spinner-32 insns.def insns.def (opt_regexpmatch2): respect redefined match op
Octocat-spinner-32 internal.h object.c: rb_class_search_ancestor
Octocat-spinner-32 io.c process.c: constify
Octocat-spinner-32 iseq.c iseq.c: linear search
Octocat-spinner-32 iseq.h * include/ruby/ruby.h (struct rb_data_type_struct), gc.c: add
Octocat-spinner-32 lex.c.blt * defs/keywords (reserved_word): made inline function static.
Octocat-spinner-32 load.c * parse.y: support Symbol GC. [ruby-trunk Feature #9634]
Octocat-spinner-32 loadpath.c * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
Octocat-spinner-32 localeinit.c localeinit.c: cp on cygwin
Octocat-spinner-32 main.c * include/ruby/debug.h: introdudced.
Octocat-spinner-32 marshal.c * bignum.c (SIZEOF_BDIGIT): Renamed from SIZEOF_BDIGITS.
Octocat-spinner-32 math.c * internal.h: Rename macro names: RBIGNUM_FOO to BIGNUM_FOO.
Octocat-spinner-32 method.h * method.h: rearrange rb_method_definition_struct to save 8 bytes in
Octocat-spinner-32 miniinit.c ext/rbconfig/sizeof: move to an extension library
Octocat-spinner-32 node.c * include/ruby/util.h: removed extra semicolon in definition of
Octocat-spinner-32 node.h * node.h: catch up comments for last commit.
Octocat-spinner-32 numeric.c * enumerator.c (enumerator_block_call): use PARRAY_CONST_PTR()
Octocat-spinner-32 object.c object.c: rb_class_search_ancestor
Octocat-spinner-32 pack.c pack.c: hide associated objects
Octocat-spinner-32 parse.y * parse.y (rb_str_dynamic_intern): set mark bit if dynamic symbol
Octocat-spinner-32 prelude.rb * prelude.rb: Moved Mutex#synchronize to
Octocat-spinner-32 probes.d vm_method.c: add new ruby::method-cache-clear dtrace probe
Octocat-spinner-32 probes_helper.h probes_helper.h (RUBY_DTRACE_HOOK): correct type for _id
Octocat-spinner-32 proc.c proc.c: use already included ancestor iclass
Octocat-spinner-32 process.c * process.c (OBJ2UID1): Defined even if getpwnam_r is not usable.
Octocat-spinner-32 random.c * internal.h: Rename macro names: RBIGNUM_FOO to BIGNUM_FOO.
Octocat-spinner-32 range.c range.c: unused function
Octocat-spinner-32 rational.c * bignum.c (SIZEOF_BDIGIT): Renamed from SIZEOF_BDIGITS.
Octocat-spinner-32 re.c string.c: infect match result
Octocat-spinner-32 regcomp.c * regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.
Octocat-spinner-32 regenc.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
Octocat-spinner-32 regenc.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
Octocat-spinner-32 regerror.c * regcomp.c: Merge Onigmo 3d855b3.
Octocat-spinner-32 regexec.c * Merge Onigmo 5.13.4 f22cf2e.
Octocat-spinner-32 regint.h * Merge Onigmo 5.13.4 f22cf2e.
Octocat-spinner-32 regparse.c * Merge Onigmo 5.13.4 f22cf2e.
Octocat-spinner-32 regparse.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
Octocat-spinner-32 regsyntax.c * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
Octocat-spinner-32 ruby.c ruby.c: remove mangled_path
Octocat-spinner-32 ruby_atomic.h iseq.c: potential memory leak
Octocat-spinner-32 safe.c * include/ruby/intern.h,
Octocat-spinner-32 signal.c * signal.c (check_stack_overflow): Don't use ucontext_t if ucontext.h
Octocat-spinner-32 siphash.c siphash.c: fix missing condition
Octocat-spinner-32 siphash.h merge revision(s) 37585,37587,37591,37592,37597,37599:
Octocat-spinner-32 sparc.c * sparc.c: Use __asm__ instead of asm for gcc.
Octocat-spinner-32 sprintf.c * parse.y: support Symbol GC. [ruby-trunk Feature #9634]
Octocat-spinner-32 st.c st.c (st_init_table_with_size): update comment
Octocat-spinner-32 strftime.c * strftime.c (rb_strftime_with_timespec): Test yday range.
Octocat-spinner-32 string.c string.c: reduce function calls
Octocat-spinner-32 struct.c struct.c: avoid pinning down
Octocat-spinner-32 thread.c * parse.y: support Symbol GC. [ruby-trunk Feature #9634]
Octocat-spinner-32 thread_native.h * thread_native.h: add rb_nativethread_self() which returns
Octocat-spinner-32 thread_pthread.c configure.in: define SET_THREAD_NAME
Octocat-spinner-32 thread_pthread.h * thread_(pthread|win32).h: rename rb_thread_cond_t to
Octocat-spinner-32 thread_win32.c vm_core.h: rb_thread_struct::machine
Octocat-spinner-32 thread_win32.h * thread_(pthread|win32).h: rename rb_thread_cond_t to
Octocat-spinner-32 time.c time.c: freeze and preserve marshal-loaded time zone
Octocat-spinner-32 timev.h configure.in, win32/Makefile.sub: PACKED_STRUCT with VC
Octocat-spinner-32 transcode.c * transcode.c (str_transcode0): don't scrub invalid chars if
Octocat-spinner-32 transcode_data.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
Octocat-spinner-32 util.c util.c: let getcwd allocate buffer
Octocat-spinner-32 variable.c variable.c, vm_method.c: pin down
Octocat-spinner-32 version.c version.c: EXIT_SUCCESS
Octocat-spinner-32 version.h * 2014-04-16
Octocat-spinner-32 vm.c vm.c: avoid inadvertent pin-down
Octocat-spinner-32 vm_backtrace.c vm_backtrace.c: initialize flag
Octocat-spinner-32 vm_core.h * internal.h, vm_core.h: move LIKELY/UNLIKELY/UNINITIALIZED_VAR()
Octocat-spinner-32 vm_debug.h defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
Octocat-spinner-32 vm_dump.c * vm_dump.c (rb_print_backtrace): current implementation
Octocat-spinner-32 vm_eval.c eval_intern.h: VAR_INITIALIZED
Octocat-spinner-32 vm_exec.c * vm_exec.c (cfp): Fixes a SEGV issue in r44554.
Octocat-spinner-32 vm_exec.h * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
Octocat-spinner-32 vm_insnhelper.c proc.c: fix super in bound UnboundMethod
Octocat-spinner-32 vm_insnhelper.h * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
Octocat-spinner-32 vm_method.c variable.c, vm_method.c: pin down
Octocat-spinner-32 vm_opts.h fix minor code comment typos
Octocat-spinner-32 vm_trace.c * vm_trace.c: fix typo
Octocat-spinner-32 vsnprintf.c * vsnprintf.c: remove duplicated def of `UNINITIALIZED_VAR()'.
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 does 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.