aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * include/ruby/ruby.h: constify RBasic::klass and addko12013-05-1334-112/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RBASIC_CLASS(obj) macro which returns a class of `obj'. This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. * object.c: add new function rb_obj_reveal(). This function reveal interal (hidden) object by rb_obj_hide(). Note that do not change class before and after hiding. Only permitted example is: klass = RBASIC_CLASS(obj); rb_obj_hide(obj); .... rb_obj_reveal(obj, klass); TODO: API design. rb_obj_reveal() should be replaced with others. TODO: modify constified variables using cast may be harmful for compiler's analysis and optimizaton. Any idea to prohibt inserting RBasic::klass directly? If rename RBasic::klass and force to use RBASIC_CLASS(obj), then all codes such as `RBASIC(obj)->klass' will be compilation error. Is it acceptable? (We have similar experience at Ruby 1.9, for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)". * internal.h: add some macros. * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal object. * RBASIC_SET_CLASS(obj, cls) set RBasic::klass. * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS without write barrier (planned). * RCLASS_SET_SUPER(a, b) set super class of a. * array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c, file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c, parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c, string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c: Use above macros and functions to access RBasic::klass. * ext/coverage/coverage.c, ext/readline/readline.c, ext/socket/ancdata.c, ext/socket/init.c, * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko12013-05-1333-212/+217
| | | | | | | | instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: add new utility macros to accessko12013-05-132-0/+11
| | | | | | | | | | | Array's element. * RARRAY_AREF(a, i) returns i-th element of an array `a' * RARRAY_ASET(a, i, v) set i-th element of `a' to `v' This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: add a comment.ko12013-05-131-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_obj_setup): added.ko12013-05-133-5/+18
| | | | | | | | | * include/ruby/ruby.h (OBJSETUP): ues rb_obj_setup() instead of a macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_data_object_alloc): check klass only if klass is not 0.ko12013-05-132-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):ko12013-05-132-8/+8
| | | | | | | | use NEWOBJ_OF() instead of NEWOBJ(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: Kernel#singleton_methodnobu2013-05-133-5/+76
| | | | | | | | | | | * proc.c (rb_obj_singleton_method): new method Kernel#singleton_method which returns a Method object of the singleton method. non-singleton method causes NameError, but not aliased or zsuper method, right now. [ruby-core:54914] [Feature #8391] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_method.c: rb_method_entry_atnobu2013-05-133-1/+11
| | | | | | | | * vm_method.c (rb_method_entry_at): return the method entry for id at klass, without ancestors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: rb_singleton_class_getnobu2013-05-133-0/+26
| | | | | | | | * class.c (rb_singleton_class_get): get the singleton class if exists, or nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: adjust indentnobu2013-05-131-1/+1
| | | | | | | * class.c (singleton_class_of): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ssl.c: Disabled OpenSSL::SSL::SSLSocket ifyugui2013-05-132-3/+18
| | | | | | | | | | defined(OPENSSL_NO_SOCK). This fixes a linkage error on platforms which do not have socket. OpenSSL itself is still useful as a set of cryptographic functions even on such platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c: Hash[] and {} are not equivalent by @eam [Fixes GH-301]zzak2013-05-132-5/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-05-13svn2013-05-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c: Document Random::DEFAULT by @eLobato [Fixes GH-304]zzak2013-05-132-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fix a typo of r40667.nagachika2013-05-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: OFFT2NUM redefinitionnobu2013-05-122-0/+7
| | | | | | | * include/ruby/ruby.h (OFFT2NUM): RUBY_REPLACE_TYPE also defines macro to convert int type to VALUE if found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typoskazu2013-05-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_iv_set, rb_iv_get): removed. Bcausekosaki2013-05-122-2/+5
| | | | | | ruby.h has a declaration for that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_uint2big, rb_int2big, rb_uint2inum)kosaki2013-05-122-6/+6
| | | | | | | (rb_int2inum, rb_ll2inum, rb_ull2inum): removed because ruby.h has a declaration for these. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: removes 'ac_cv_func_fseeko=yes' form MinGWkosaki2013-05-122-1/+5
| | | | | | specific definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_truncate): use correct type. chsize takeskosaki2013-05-123-2/+16
| | | | | | a long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: move '#define SPAWNV 1' to win32/Makefile.sub.kosaki2013-05-123-4/+6
| | | | | | * win32/Makefile.sub: see above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: removes AC_CHECK_FUNCS(setitimer) because it'skosaki2013-05-122-5/+5
| | | | | | unsed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: removes AC_CHECK_FUNCS(pause) because it's unused.kosaki2013-05-122-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (rb_f_kill): fixes typo. s/HAS_KILLPG/HAVE_KILLPG/.kosaki2013-05-122-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: abort if gettimeofday doesn't exist.kosaki2013-05-122-1/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: removes AC_CHECK_FUNC(ftruncate64).kosaki2013-05-124-6/+25
| | | | | | | | | | | * configure.in: adds RUBY_REPLACE_TYPE(off_t) for creating NUM2OFFT. * file.c (rb_file_truncate): use correct type. chsize() take a long. * include/ruby/ruby.h (NUM2OFFT): use a definition created by a configure script by default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: removes AC_CHECK_FUNC(fseeko, fseeko64, ftello,kosaki2013-05-125-55/+11
| | | | | | | | | | | | ftello64). They are not used from anywhere. * win32/win32.c (fseeko): removes. * win32/win32.c (rb_w32_ftello): removes. * include/ruby/win32.h: removes declarations of rb_w32_ftello and rb_w32_fseeko. * win32/Makefile.sub: removes '#define HAVE_FTELLO 1'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: remove AC_CHECK_FUNC(close). It is not used fromkosaki2013-05-122-1/+5
| | | | | | anywhere. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: adds comments for setjmp check.kosaki2013-05-122-9/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: move clock_gettime() check into regular place.kosaki2013-05-122-9/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: add getenv() declaration check.kosaki2013-05-123-1/+8
| | | | | | * dln_find.c: add HAVE_DECL_GETENV test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: sorts AC_CHECK_FUNCS()s as alphabetical order.kosaki2013-05-122-104/+106
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c: remove redundant decl for big_lshift() big_rshift().kosaki2013-05-122-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/rubysocket.h (rsock_inspect_sockaddr): as r40646naruse2013-05-122-1/+6
| | | | | | check HAVE_TYPE_STRUCT_SOCKADDR_DL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2013-05-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2013-05-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixed wrong document for Socket.tcp by @lann [fix GH-302]hsbt2013-05-121-5/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-05-12svn2013-05-111-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* raddrinfo.c: suppress warningsnobu2013-05-111-2/+2
| | | | | | | * ext/socket/raddrinfo.c (rsock_inspect_sockaddr): cast down explicitly to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/rubysocket.h (HAVE_TYPE_STRUCT_SOCKADDR_DL):naruse2013-05-112-1/+11
| | | | | | | MSVC has struct sockadddr_dl, but its content is broken. http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130511T103938Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/rinda/test_rinda.rb: Socket.getifaddrs may returns an interfaceakr2013-05-112-3/+6
| | | | | | | | which #addr method returns nil for venet0 in OpenVZ. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/raddrinfo.c (rsock_inspect_sockaddr): Add casts toakr2013-05-112-12/+17
| | | | | | | | suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add debug print to investigate a failure on Travis-CI.akr2013-05-111-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Simplify test with Socket.getifaddrsnaruse2013-05-111-8/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Describe Socket.getifaddrs.akr2013-05-111-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.nobu2013-05-110-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket: New method, Socket.getifaddrs, implemented.akr2013-05-119-32/+756
| | | | | | | | [ruby-core:54777] [Feature #8368] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* disable test_fcntl_lock_linux on x32.akr2013-05-111-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e