summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-05-14* ext/dl/lib/dl/func.rb (DL::Function#call): check tainted whennagachika
$SAFE > 0. * ext/fiddle/function.c (function_call): check tainted when $SAFE > 0. * test/fiddle/test_func.rb (module Fiddle): add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14fix a typokazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14Add NEWS about Kernel#singleton_method r40684 [Feature #8391]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14iphlpapi is unavailable with older VCnobu
* include/ruby/win32.h, win32/Makefile.sub, win32/win32.c: iphlpapi is not available with older Visual C. works with VC9 or later at least. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14parse.y: fix argument typenobu
* parse.y (is_global_name_punct): fix argument type, to get rid of implicit promotion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14win32.h: fix for VC9nobu
* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): split from intptr_t and uintptr_t, since VC9 defines the latters only in crtdefs.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14* win32/win32.c (NET_LUID): mingw may have NET_LUID and not definedusa
_IFDEF_. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14fix a typo and remove "file (func):" only duplicated of upper entrykazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* string.c (rb_str_new_frozen): remove debug print.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable to generate write barrier protectedko1
arrays (T_ARRAY). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable to generate write barrier protectedko1
objects (T_STRING). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable to generate write barrier protectedko1
objects (T_OBJECT). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable to generate write barrier protectedko1
objects for numeric types (Float, Complex, Rational, Bignum). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: enable RGENGC (USE_RGENGC)ko1
but no type creates write protected (sunny) objects (RGENGC_WB_PROTECTED_* == 0). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* gc.c: support RGENGC. [ruby-trunk - Feature #8339]ko1
See this ticet about RGENGC. * gc.c: Add several flags: * RGENGC_DEBUG: if >0, then prints debug information. * RGENGC_CHECK_MODE: if >0, add assertions. * RGENGC_PROFILE: if >0, add profiling features. check GC.stat and GC::Profiler. * include/ruby/ruby.h: disable RGENGC by default (USE_RGENGC == 0). * array.c: add write barriers for T_ARRAY and generate sunny objects. * include/ruby/ruby.h (RARRAY_PTR_USE): added. Use this macro if you want to access raw pointers. If you modify the contents which pointer pointed, then you need to care write barrier. * bignum.c, marshal.c, random.c: generate T_BIGNUM sunny objects. * complex.c, include/ruby/ruby.h: add write barriers for T_COMPLEX and generate sunny objects. * rational.c (nurat_s_new_internal), include/ruby/ruby.h: add write barriers for T_RATIONAL and generate sunny objects. * internal.h: add write barriers for RBasic::klass. * numeric.c (rb_float_new_in_heap): generate sunny T_FLOAT objects. * object.c (rb_class_allocate_instance), range.c: generate sunny T_OBJECT objects. * string.c: add write barriers for T_STRING and generate sunny objects. * variable.c: add write barriers for ivars. * vm_insnhelper.c (vm_setivar): ditto. * include/ruby/ruby.h, debug.c: use two flags FL_WB_PROTECTED and FL_OLDGEN. * node.h (NODE_FL_CREF_PUSHED_BY_EVAL, NODE_FL_CREF_OMOD_SHARED): move flag bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* gc.c: remove rb_objspace_t::marked_num.ko1
We can use `objspace_live_num()' instead of removed `marked_num' if it is after `after_gc_sweep()' function call. * gc.c (after_gc_sweep): use objspace_live_num() instead of removed rb_objspace_t::marked_num. * gc.c (gc_mark_ptr, gc_marks): remove rb_objspace_t::marked_num code. * gc.c (gc_prepare_free_objects): do not call set_heaps_increment() with checking objspace->heap.marked_num. At this point, we only need to check availability of free-cell. * gc.c (gc_prepare_free_objects): * gc.c (lazy_sweep): call after_gc_sweep() if there are no sweep_able entry. * gc.c (rest_sweep, gc_prepare_free_objects): remove after_gc_sweep() call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* gc.c: disable GC_PROFILE_MORE_DETAIL (fix last commit).ko1
* gc.c (gc_prof_set_malloc_info): fix "objspace->heap.live_num" to "objspace_live_num(objspace)". There is no such member variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* gc.c: refactoring GC::Profiler.ko1
* gc.c (gc_prof_sweep_timer_start/stop): removed because they doesn't support lazy sweep. * gc.c (gc_prof_sweep_slot_timer_start/stop): added. redefine `sweeping time' to accumulated time of all of slot_sweep(). * gc.c (rb_objspace_t::profile::count): renamed to rb_objspace_t::profile::next_index. `counter' seems ambiguous. increment it when next record is acquired. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* 2013-05-14svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RRational::(num,den) andko1
RComplex::(real,imag). Add macro to set these values: * RRATIONAL_SET_NUM() * RRATIONAL_SET_DEN() * RCOMPLEX_SET_REAL() * RCOMPLEX_SET_IMAG() This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. TODO: API design. RRATIONAL_SET(rat,num,den) is enough? TODO: Setting constify variable with cast has same issue of r40691. * complex.c, rational.c: use above macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: fix a typoeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* ext/socket/extconf.rb: Check socketpair again.akr
It is required on Unix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* win32/win32.c (getipaddrs): use alternamtive interface name ifusa
available, because if_nametoindex() requires them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]usa
emulate getipaddrs(3) on Unix. * win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above function. * include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't substitute for any function, so use non-prefixed name. * ext/socket/extconf.rb (socketpair); follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* iseq.c (prepare_iseq_build): remove additional line braek.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RBasic::klass and addko1
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
2013-05-13* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko1
instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: add new utility macros to accessko1
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
2013-05-13* ChangeLog: add a comment.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* object.c (rb_obj_setup): added.ko1
* 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
2013-05-13* gc.c (rb_data_object_alloc): check klass only if klass is not 0.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):ko1
use NEWOBJ_OF() instead of NEWOBJ(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13proc.c: Kernel#singleton_methodnobu
* 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
2013-05-13vm_method.c: rb_method_entry_atnobu
* 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
2013-05-13class.c: rb_singleton_class_getnobu
* 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
2013-05-13class.c: adjust indentnobu
* class.c (singleton_class_of): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* ext/openssl/ossl_ssl.c: Disabled OpenSSL::SSL::SSLSocket ifyugui
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
2013-05-13* hash.c: Hash[] and {} are not equivalent by @eam [Fixes GH-301]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* 2013-05-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* random.c: Document Random::DEFAULT by @eLobato [Fixes GH-304]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* ChangeLog: fix a typo of r40667.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12ruby.h: OFFT2NUM redefinitionnobu
* 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
2013-05-12fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* include/ruby/intern.h (rb_iv_set, rb_iv_get): removed. Bcausekosaki
ruby.h has a declaration for that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* include/ruby/intern.h (rb_uint2big, rb_int2big, rb_uint2inum)kosaki
(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
2013-05-12* configure.in: removes 'ac_cv_func_fseeko=yes' form MinGWkosaki
specific definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* file.c (rb_file_s_truncate): use correct type. chsize takeskosaki
a long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* process.c: move '#define SPAWNV 1' to win32/Makefile.sub.kosaki
* win32/Makefile.sub: see above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e