aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* openssl: wrapper object before allocnobu2015-05-2923-124/+226
| | | | | | | * ext/openssl: make wrapper objects before allocating structs to get rid of potential memory leaks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* psych: allocate structs with wrappernobu2015-05-292-5/+4
| | | | | | | | | * ext/psych/psych_emitter.c (allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. * ext/psych/psych_parser.c (allocate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: check NTH_REF rangenobu2015-05-296-14/+57
| | | | | | | | | | * compile.c (iseq_compile_each): out of range NTH_REF is always nil. * parse.y (parse_numvar): check overflow of NTH_REF and range. [ruby-core:69393] [Bug #11192] * util.c (ruby_scan_digits): make public and add length parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket: avoid redundant fcntl on Linuxnormal2015-05-294-3/+26
| | | | | | | | | | | | | | | | | | | | * ext/socket/ancdata.c (bsock_sendmsg_internal, bsock_recvmsg_internal): avoid redundant fcntl on Linux [ruby-core:69154] [Feature #11145] * ext/socket/init.c (rsock_s_recvfrom_nonblock): ditto * ext/socket/rubysocket.h (MSG_DONTWAIT_RELIABLE): new macro MSG_DONTWAIT is enough to force non-blocking I/O under Linux, so avoid changing the state of a socket. This will allow certain threads to do a non-destructive non-blocking "peek" while others block (without relying on an extra ppoll syscall). We shall be conservative about enabling this feature since some OSes may have incomplete support for MSG_DONTWAIT. I shall defer to a FreeBSD expert to enable that for FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: add missing reference [ci skip]normal2015-05-291-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/*: use monotonic clock for timeoutsnormal2015-05-293-5/+10
| | | | | | | | | | The monotonic clock is preferred as it is guaranteed to be continuous and not subject to jumps due to adjustments. * lib/net/resolv.rb (request): use monotonic clock * lib/net/http.rb (begin_transport, end_transport): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-29svn2015-05-281-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/objspace/objspace.c: add two methods to debug internals.ko12015-05-284-0/+134
| | | | | | | | | | | * ObjectSpace.internal_class_of: return RBASIC_CLASS(obj). * ObjectSpace.internal_super_of: return RCLASS_SUPER(cls). * NEWS: add information about both methods. * test/objspace/test_objspace.rb: add tests for both methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generator.c: allocate structs with wrappernobu2015-05-283-11/+18
| | | | | | | | * ext/json/generator/generator.c (cState_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: allocate structs with wrappernobu2015-05-284-23/+23
| | | | | | | | * ext/json/parser/parser.rl (cJSON_parser_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: wrapper object before allocnobu2015-05-281-2/+4
| | | | | | | * ext/win32ole/win32ole.c (Init_win32ole): make wrapper object before making st_table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib.c: allocate structs with wrappernobu2015-05-282-5/+9
| | | | | | | | | * ext/tk/tcltklib.c (ip_create_slave_core): allocate structs with making new wrapper objects and get rid of potential memory leak. * ext/tk/tkutil/tkutil.c (allocate_cbsubst_info): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tkutil.c: check arguments typenobu2015-05-281-5/+7
| | | | | | | | | | | | * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_key): check arguments type. implicit conversion is disabled to get rid of method calls which can modify other arguments. * ext/tk/tkutil/tkutil.c (cbsubst_table_setup): ditto. * ext/tk/tkutil/tkutil.c (cbsubst_scan_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tkutil.c: check typenobu2015-05-281-0/+1
| | | | | | | | * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_key): ensure the result type of a method call to be an array before accessing by RARRAY macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-28svn2015-05-271-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo in samples for tk ext [skip ci]nobu2015-05-273-2/+8
| | | | | | | | * ext/tk/sample/figmemo_sample.rb (open_file), ext/tk/sample/tktextio.rb (TkTextIO): fix typo in messages. [Fix GH-916] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib.c: fix memory leaknobu2015-05-271-0/+3
| | | | | | | * ext/tk/tcltklib.c (ip_init): reject already initialized interpreter to fix memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_bigdecimal.rb: adjustnobu2015-05-271-2/+2
| | | | | | | * test/bigdecimal/test_bigdecimal.rb (assert_no_memory_leak): fix GC scope and adjust limits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bigdecimal.c: wrapper object before allocnobu2015-05-272-6/+35
| | | | | | | | | | * ext/bigdecimal/bigdecimal.c (VpNewRbClass): make wrapper object before result structs allocation and manage refcount for each elements to get rid of potential memory leak. * ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* envutil.rb: EnvUtil.gc_stress_to_classnobu2015-05-271-0/+8
| | | | | | | * test/lib/envutil.rb (EnvUtil.gc_stress_to_class): check if GC.stress_to_class is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: mark stress_to_classnobu2015-05-271-0/+2
| | | | | | * gc.c (gc_mark_roots): stress_to_class is also a GC root. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: stress_to_classnobu2015-05-271-0/+59
| | | | | | | | | | | | * gc.c (newobj_of): debug feature to fail allocation of particular classes. * gc.c (rb_gcdebug_add_stress_to_class): add classes to the list. * gc.c (rb_gcdebug_remove_stress_to_class): remove classes from the list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: use RB_GC_GUARD instead of volatilenormal2015-05-272-3/+12
| | | | | | | | | | | | | | | | | | | | | | | From doc/extension.rdoc: > > Using the RB_GC_GUARD macro is preferable to using the "volatile" > keyword in C. RB_GC_GUARD has the following advantages: > > 1) the intent of the macro use is clear > > 2) RB_GC_GUARD only affects its call site, "volatile" generates some > extra code every time the variable is used, hurting optimization. > > 3) "volatile" implementations may be buggy/inconsistent in some > compilers and architectures. RB_GC_GUARD is customizable for broken > systems/compilers without those without negatively affecting other > systems. * ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode, ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile [ruby-core:69371] [Bug #11185] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drb: avoid redundant fcntl callnormal2015-05-273-3/+7
| | | | | | | | | | | Sockets are close-on-exec by default since Ruby 2.0, so it is redundant to set it again. * lib/drb/drb.rb (set_sockopt): remove redundant fcntl call * lib/drb/unix.rb (set_sockopt): ditto [ruby-core:69128] [Feature #11137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-27svn2015-05-271-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ossl_asn1.c: [DOC] Fix typo [skip ci]nobu2015-05-271-1/+1
| | | | | | | * ext/openssl/ossl_asn1.c (Init_ossl_asn1): [DOC] Fix typo "recieved" to "received". [Fix GH-913] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_alias): should resolve refined methods.shugo2015-05-263-0/+34
| | | | | | [ruby-core:69360] [Bug #11182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-26svn2015-05-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix conditionkazu2015-05-262-1/+5
| | | | | | * include/ruby/defines.h (RUBY_ATTR_ALLOC_SIZE): fix condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/redmine-backporter.rb (rel): after the relations is changed,usa2015-05-252-0/+8
| | | | | | | @changesets is no longer right. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add .gitignore rules for Microsoft Visual C++naruse2015-05-251-0/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (setup_overlapped): seek to the file end only whennaruse2015-05-252-4/+13
| | | | | | writing (mode:a), not reading (mode:a+, read). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: refine messagenobu2015-05-251-1/+2
| | | | | | | * io.c (prepare_getline_args): refine the expected arity in an exception message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-25svn2015-05-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (Numeric#negative?): [DOC] Fix call-seq.eregon2015-05-242-1/+6
| | | | | | Patch by @yui-knk. [Fixes GH-908] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c: show_usage_linenobu2015-05-241-9/+15
| | | | | | | * ruby.c (show_usage_line): extract function to print one usage line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-24svn2015-05-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * debug.c (ruby_debug_print_id): use rb_id2name() for fprintf().ko12015-05-232-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: suppress a warningnobu2015-05-231-1/+1
| | | | | | | * win32/win32.c (rb_w32_write_console): fix the type to suppress a warning of difference in signedness. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* man: updatednobu2015-05-236-5/+10
| | | | | | | * man/*.1: updated dates in man pages. [ruby-dev:48988] [Bug #11171] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: update-man-datenobu2015-05-232-0/+11
| | | | | | | | * common.mk (update-man-date): update last date in man pages. * tool/vcs.rb (VCS#modified): returns last modified time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file2lastrev.rb: format for modifiednobu2015-05-231-2/+4
| | | | | | | * tool/file2lastrev.rb: add optional argument to --modified, for strftime format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file2lastrev.rb: all ARGVnobu2015-05-231-27/+42
| | | | | | * tool/file2lastrev.rb: output for each arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rake.1: removednobu2015-05-231-141/+0
| | | | | | * man/rake.1: rake has been gemified. [Feature #11025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write_console): should return the count ofusa2015-05-222-1/+9
| | | | | | | actually eaten characters, include escape sequences. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (constat_apply): fixed comment. [skip ci]usa2015-05-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-23svn2015-05-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indent (tabify) [ci skip]kazu2015-05-221-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2015-05-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Stylingmarcandre2015-05-221-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e