1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
The Ruby Programming Language [mirror]
Find a file
usa d410184643 merge revision(s) 57024: [Backport #13015]
vm.c: check type of hash to merge

	* vm.c (core_hash_merge): check the type of the target hash to
	  merge.  [ruby-core:78536] [Bug #13015]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25 18:13:17 +00:00
benchmark merge revision(s) 50084: [Backport #10999] 2015-05-19 18:11:15 +00:00
bin
bootstraptest merge revision(s) 49390: [Backport #10775] 2015-05-20 16:21:30 +00:00
ccan
coverage
cygwin merge revision(s) 49042: [Backport #10657] 2014-12-31 23:38:01 +00:00
defs merge revision(s) 54131: [Backport #8851] 2016-04-22 07:11:04 +00:00
doc merge revision(s) 51871,51872,51874,51875,51876,51877,51878,57517: [Backport #13190] 2017-03-25 17:45:00 +00:00
enc merge revision(s) 57816,57817: [Backport #13292] 2017-03-25 17:01:54 +00:00
ext merge revision(s) 57477,57478,57479,57492: [Backport #12405] 2017-03-25 18:07:08 +00:00
gems
include merge revision(s) 57762: [Backport #13267] 2017-03-25 16:14:19 +00:00
lib merge revision(s) 57515: [Backport #13169] 2017-03-25 16:35:25 +00:00
man merge revision(s) 55984: [Backport #12692] 2016-09-30 15:52:42 +00:00
misc
missing merge revision(s) 55232: [Backport #12823] 2016-10-27 07:38:12 +00:00
nacl
sample
spec merge revision(s) 56682: [Backport #12922] 2016-11-11 22:53:02 +00:00
template merge revision(s) 49758,50356,50359: [Backport #12563] 2016-07-11 15:17:58 +00:00
test merge revision(s) 57024: [Backport #13015] 2017-03-25 18:13:17 +00:00
tool merge revision(s) 49758,50356,50359: [Backport #12563] 2016-07-11 15:17:58 +00:00
win32 merge revision(s) 56310: [Backport #13364] 2017-03-25 17:32:17 +00:00
.document
.editorconfig
.gdbinit
.gitignore
.indent.pro
.travis.yml merge revision(s) 49176,49334,49802,49814,49815,49816,50036,51453,51705,51706,51708,51805,51807,53298,53517,53519,53521,53522,53523,53526,53527,54017,54034: 2016-03-29 21:07:26 +00:00
addr2line.c
addr2line.h
array.c merge revision(s) 57119: [Backport #13052] 2016-12-27 11:03:50 +00:00
bignum.c * bignum.c (Init_Bignum): revert a part of previous commit (r55598), 2016-07-06 15:07:44 +00:00
BSDL
ChangeLog merge revision(s) 51871,51872,51874,51875,51876,51877,51878,57517: [Backport #13190] 2017-03-25 17:45:00 +00:00
class.c merge revision(s) 57360: [Backport #12884] 2017-03-25 15:39:40 +00:00
common.mk merge revision(s) 55434: [Backport #12401] 2016-08-16 06:03:51 +00:00
compar.c merge revision(s) 49224,49234,49235: [Backport #10711] 2015-01-17 16:00:11 +00:00
compile.c merge revision(s) 57368: [Backport #12613] 2017-03-25 15:30:36 +00:00
complex.c merge revision(s) 54896,54897: [Backport #12343] 2016-06-10 06:38:57 +00:00
configure.in merge revision(s) 57762: [Backport #13267] 2017-03-25 16:14:19 +00:00
constant.h
cont.c merge revision(s) 57020,57021: [Backport #13014] 2016-12-27 10:49:55 +00:00
CONTRIBUTING.md
COPYING
COPYING.ja
debug.c
dir.c merge revision(s) 50218: [Backport #11054] [Backport #11069] 2015-05-19 19:06:36 +00:00
dln.c merge revision(s) 56832: [Backport #12956] 2016-12-27 09:28:20 +00:00
dln.h
dln_find.c
dmydln.c
dmyenc.c
dmyext.c
encoding.c merge revision(s) 57078: [Backport #13034] 2016-12-27 10:52:35 +00:00
enum.c merge revision(s) 57434: [Backport #13161] 2017-03-25 17:36:34 +00:00
enumerator.c
error.c merge revision(s) 56766,56767: [Backport #12925] 2016-11-14 18:37:39 +00:00
eval.c merge revision(s) 56125,56150: [Backport #12741] 2017-03-25 17:13:49 +00:00
eval_error.c merge revision(s) 57020,57021: [Backport #13014] 2016-12-27 10:49:55 +00:00
eval_intern.h merge revision(s) 56252,56254: [Backport #12743] 2016-10-27 07:48:53 +00:00
eval_jump.c merge revision(s) 54681: [Backport #12302] 2016-04-26 04:17:39 +00:00
file.c merge revision(s) 54887-54889: [Backport #12340] 2016-06-10 06:35:57 +00:00
gc.c merge revision(s) 55663: [Backport #12583] 2016-08-16 04:36:44 +00:00
gc.h
gem_prelude.rb
golf_prelude.rb
goruby.c
GPL
hash.c merge revision(s) 57278,57279: [Backport #12855] 2017-03-25 16:31:54 +00:00
ia64.s
inits.c
insns.def merge revision(s) 57278,57279: [Backport #12855] 2017-03-25 16:31:54 +00:00
internal.h merge revision(s) 57278,57279: [Backport #12855] 2017-03-25 16:31:54 +00:00
io.c merge revision(s) 57767,57943: [Backport #10403] 2017-03-25 17:11:47 +00:00
iseq.c merge revision(s) 51190: [Backport #11338] 2015-11-29 07:29:09 +00:00
iseq.h
KNOWNBUGS.rb
LEGAL
lex.c.blt merge revision(s) 54131: [Backport #8851] 2016-04-22 07:11:04 +00:00
load.c merge revision(s) 51292,51439,51440: [Backport #11404] [Backport #11481] 2015-11-18 16:13:53 +00:00
loadpath.c
localeinit.c
main.c
Makefile.in merge revision(s) 49411,49419,49451,49485,49489: 2015-02-22 08:12:34 +00:00
marshal.c merge revision(s) 56894: [Backport #12974] 2016-12-27 10:11:49 +00:00
math.c merge revision(s) 49913,54492,54494,54495,54496,54499,54503: [Backport #12249] 2016-04-22 07:33:18 +00:00
method.h merge revision(s) 49222: 2015-02-19 08:04:54 +00:00
miniinit.c
NEWS merge revision(s) 53050: [Backport #11501] 2015-12-12 08:25:24 +00:00
node.c
node.h
numeric.c merge revision(s) 55123,55129,55130,55133,55136: [Backport #12414] 2016-06-10 07:09:00 +00:00
object.c merge revision(s) 56421,56422: [Backport #11736] 2016-10-27 07:27:20 +00:00
pack.c merge revision(s) 57187,57234: [Backport #13075] 2017-03-25 15:16:04 +00:00
parse.y merge revision(s) 53424,55509: [Backport #12517] 2016-08-16 12:14:41 +00:00
prelude.rb
probes.d
probes_helper.h
proc.c merge revision(s) 57765: [Backport #13273] 2017-03-25 17:08:06 +00:00
process.c merge revision(s) 54934: [Backport #12355] 2016-06-10 08:39:51 +00:00
random.c
range.c merge revision(s) 52868: [Backport #11767] 2015-12-03 17:56:53 +00:00
rational.c merge revision(s) 57539: [Backport #11752] 2017-03-25 17:34:13 +00:00
re.c merge revision(s) 57123: [Backport #13054] 2016-12-27 11:14:32 +00:00
README.EXT merge revision(s) 56980,56981: [Backport #13004] 2016-12-27 10:41:16 +00:00
README.EXT.ja merge revision(s) 56980,56981: [Backport #13004] 2016-12-27 10:41:16 +00:00
README.ja.md
README.md
regcomp.c * regcomp.c (set_bm_skip): Need to check the end of the string. 2017-03-25 16:58:03 +00:00
regenc.c
regenc.h merge revision(s) 57816,57817: [Backport #13292] 2017-03-25 17:01:54 +00:00
regerror.c
regexec.c
regint.h
regparse.c merge revision(s) 55163,55165: [Backport #12420] [Backport #12423] 2016-06-10 08:45:34 +00:00
regparse.h
regsyntax.c
ruby.c merge revision(s) 54785: [Backport #11900] 2017-03-25 17:35:52 +00:00
ruby_atomic.h merge revision(s) 52892: [Backport #11775] 2015-12-08 16:47:11 +00:00
safe.c
signal.c merge revision(s) 52668: [Backport #11692] 2016-03-28 17:21:19 +00:00
siphash.c
siphash.h
sparc.c
sprintf.c merge revision(s) 57108: [Backport #13049] 2016-12-27 10:58:14 +00:00
st.c merge revision(s) 49386: 2015-02-20 13:53:23 +00:00
strftime.c
string.c merge revision(s) 57374: [Backport #13135] 2017-03-25 16:29:17 +00:00
struct.c merge revision(s) 57522: [Backport #13189] 2017-03-25 17:37:23 +00:00
symbol.c merge revision(s) 51410: [Backport #11396] 2015-08-15 18:10:16 +00:00
symbol.h merge revision(s) 51410: [Backport #11396] 2015-08-15 18:10:16 +00:00
thread.c merge revision(s) 57477,57478,57479,57492: [Backport #12405] 2017-03-25 18:07:08 +00:00
thread_pthread.c merge revision(s) 54256: [Backport #12118] 2016-03-29 21:19:35 +00:00
thread_pthread.h
thread_win32.c
thread_win32.h
time.c merge revision(s) 57172: [Backport #13066] 2016-12-27 11:44:17 +00:00
timev.h
transcode.c merge revision(s) 55181: [Backport #12431] 2016-08-16 11:39:21 +00:00
transcode_data.h
util.c merge revision(s) 50671: [Backport #11192] 2015-07-03 19:57:42 +00:00
variable.c merge revision(s) 56938: [Backport #12988] 2016-12-27 10:35:50 +00:00
version.c
version.h merge revision(s) 57024: [Backport #13015] 2017-03-25 18:13:17 +00:00
vm.c merge revision(s) 57024: [Backport #13015] 2017-03-25 18:13:17 +00:00
vm_args.c merge revision(s) 55609: [Backport #12568] 2016-08-12 02:50:50 +00:00
vm_backtrace.c
vm_core.h merge revision(s) 54484: [Backport #12095] 2016-04-22 06:18:03 +00:00
vm_debug.h
vm_dump.c merge revision(s) 56030,56035: [Backport #12711] 2016-09-30 15:58:12 +00:00
vm_eval.c merge revision(s) 57020,57021: [Backport #13014] 2016-12-27 10:49:55 +00:00
vm_exec.c
vm_exec.h
vm_insnhelper.c merge revision(s) 53164: [Backport #11657] 2016-01-17 15:59:36 +00:00
vm_insnhelper.h
vm_method.c merge revision(s) 49222: 2015-02-19 08:04:54 +00:00
vm_opts.h
vm_trace.c merge revision(s) 57020,57021: [Backport #13014] 2016-12-27 10:49:55 +00:00
vsnprintf.c

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

mailto:matz@ruby-lang.org