aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vm_method.c: configurable global method cache sizenobu2014-09-183-3/+42
| | | | | | | | * vm_method.c (Init_Method): make global method cache size configurable by environment variable "RUBY_GLOBAL_METHOD_CACHE_SIZE" [Fix GH-719] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/-ext-/string/test_modify_expand.rb: increase limit for {je,tc}mallocnormal2014-09-172-1/+7
| | | | | | | | | | In this test, jemalloc and tcmalloc are both more hesitant to release memory to the kernel than the stock glibc allocator. Tested on jemalloc 3.6.0 (self-built) and libtcmalloc-minimal 2.0-2 (Debian package) on x86_64-linux git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/zlib/zlib.c (struct gzfile): pack (288 => 272 bytes) on 64-bitnormal2014-09-172-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-09-18svn2014-09-171-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket (rsock_connect): fix and refactor for blockingnormal2014-09-172-120/+64
| | | | | | | | | | | | | | | | | * ext/socket/init.c (rsock_connect): refactor for blocking (wait_connectable): clear error before wait [Bug #9356] We no longer use non-blocking sockets to emulate blocking behavior, so eliminate error-prone and confusing platform-dependent code. According to POSIX, connect() only needs to be called once in the face of EINTR, so do not loop on it. Before waiting on connect, drop any pending errors, since rb_wait_for_single_fd may not clear the existing error properly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Re-apply r43023 which is accidentally reverted by r47598naruse2014-09-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/rfc3986_parser.rb: specify a regexp for :OPAQUE; generic.rbnaruse2014-09-173-1/+13
| | | | | | | | assumes it is present, and will refuse all values otherwise. by Matthew Draper <matthew@trebex.net> https://github.com/ruby/ruby/pull/718 fix GH-718 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/zlib/zlib.c (zlib_mem_alloc): check overflownormal2014-09-172-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):hsbt2014-09-172-0/+6
| | | | | | added test for long long [fix GH-716] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/rbinstall.rb: fixed invalid options with latest rubygems.hsbt2014-09-172-1/+6
| | | | | | https://github.com/rubygems/rubygems/issues/1013 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-09-17svn2014-09-171-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_method.c: single expressionnobu2014-09-171-1/+1
| | | | | | * vm_method.c (GLOBAL_METHOD_CACHE): make a single expression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bm_app_aobench.rb: update links [ci skip]nobu2014-09-162-2/+6
| | | | | | | * benchmark/bm_app_aobench.rb: update outdated links to the original program. [ruby-dev:48550] [Feature #10247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* regenc.h: shrink PosixBracketEntryTypenobu2014-09-161-3/+3
| | | | | | | * regenc.h (PosixBracketEntryType): shrink by embedding `name` and reordering. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* regparse.c: remove unused variablenobu2014-09-161-1/+0
| | | | | | | * regparse.c (add_ctype_to_cc): suppress a warning by removing unused variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sprintf.c: integer overflownobu2014-09-161-3/+3
| | | | | | | * sprintf.c (rb_str_format): fix a possible integer overflow and suppress implicit conversion warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-09-16svn2014-09-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544naruse2014-09-1533-236/+390
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trivial packing for on-stack structsnormal2014-09-153-3/+9
| | | | | | | | | | * io.c (struct io_advise_struct): 32 => 24 bytes on 64-bit * io.c (struct io_internal_writev_struct): 24 => 16 bytes on 64-bit * process.c (struct waitpid_arg): ditto Slightly reduce stack pressure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/bm_app_aobench.rb: spelling fix [ci skip]normal2014-09-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pathname.rb: fix a Pathname#relative_path_from crash onnobu2014-09-153-1/+23
| | | | | | | | | | * ext/pathname/lib/pathname.rb (SAME_PATHS): Pathname#relative_path_from uses String#casecmp to compare strings on case-insensitive filesystem platforms (e.g., Windows). This can return nil for strings with different encodings, and the code previously assumed that it always returned a Fixnum. [Fix GH-713] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fiddle/import.rb: fix typonobu2014-09-153-1/+15
| | | | | | | * ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof): fix typo, SIZEOF_LONG_LON. [Fix GH-714] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-09-15svn2014-09-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sprintf.c: improve rational 'f' formatnobu2014-09-143-13/+58
| | | | | | | * sprintf.c (rb_str_format): rational 'f' format works for more values. [fix GH-717] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.inc.tmpl + instruction.rb: typo fixesnormal2014-09-143-2/+7
| | | | | | | * template/vm.inc.tmpl: "insns.c" => "insns.def" * tool/instruction.rb: typo fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2014-09-140-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_tracer.rb: fixed testcase for rubygems update.hsbt2014-09-142-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)hsbt2014-09-14153-975/+5394
| | | | | | | | Complete history at: https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216 * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb: update versiontenderlove2014-09-143-6/+11
| | | | | | * ext/psych/psych.gemspec: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c, gc.c: suppress warningsnobu2014-09-142-3/+3
| | | | | | | | | * compile.c (iseq_compile_each): suppress implicit conversion warning by old apple gcc 4.2. * gc.c (RVALUE_FLAGS_AGE, heap_page_allocate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ccan/container_of: add container_of_or_nullnormal2014-09-132-0/+41
| | | | | | | | | | | | | | | * ccan/container_of/container_of.h (container_of_or_null): added [ccan 7ec5b8e06b2fd5fa98b1fcde1158c286d2d429d8] (David Gibson) It's quite common to have a pointer which could be either a pointer to a structure member, or NULL. This needs special casing with container_of(), or it will convert NULL into something strange. This patch adds container_of_or_null(), which will return NULL if passed (an appropriately typed) NULL, or the containining structure as container_of() otherwise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-09-14svn2014-09-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ccan/list: new list_{del,node}_init functionsnormal2014-09-132-1/+40
| | | | | | | | * ccan/list/list.h (list_del_init, list_node_init): new functions for multiple list_del() calls [ccan ec8654d94d3c5c47aa5f82698f7e8048c79765b1] (Rusty Russell) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: [DOC] fix for Hash#store docsnobu2014-09-132-1/+9
| | | | | | | | | * hash.c (rb_hash_aset): fix misleading example which may suggest that Hash.store will return self instead of value - Hash#store is returning value and update itself, as well as Hash#[]=. [Fix GH-715] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: simplifynobu2014-09-131-6/+4
| | | | | | | * class.c (singleton_class_of): use local variable and remove duplicated member access. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: freeze meta class onlynobu2014-09-133-3/+7
| | | | | | | * class.c (singleton_class_of): should not propagete freezing to meta meta class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: use ALLOC(rb_subclass_entry_t)normal2014-09-132-2/+6
| | | | | | It is easier to search for allocations by type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* simplify some trivial rb_data_type_t callbacksnormal2014-09-134-44/+32
| | | | | | | | | | | | | | | | | | * process.c (free_exec_arg): remove (memsize_exec_arg): ptr is never NULL (exec_arg_data_type): use RUBY_TYPED_DEFAULT_FREE * variable.c (autoload_i_free): remove (autoload_data_i_type): use RUBY_TYPED_DEFAULT_FREE (autoload_memsize): ptr is never NULL * vm_backtrace.c (location_free): remove (location_mark): ptr is never NULL (location_data_type): use RUBY_TYPED_DEFAULT_FREE (backtrace_mark): ditto (backtrace_free): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc/NEWS-2.0.0: fix typo for default RUBY_FIBER_MACHINE_STACK_SIZEnormal2014-09-132-1/+6
| | | | | | | Checked against definition in vm_core.h [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole_event.c(ev_advise, ole_event_free,suke2014-09-133-1/+14
| | | | | | | | | fev_s_allocate, fev_unadvise): avoid segmentation fault when COM server freed before calling Unadvise from WIN32OLE_EVENT object. * ext/win32ole/win32ole.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: intern_cstrnobu2014-09-131-5/+5
| | | | | | | | * parse.y (intern_cstr): remove `_without_pindown` suffix and use rb_intern3() as well as RIPPER, for the time being. [ruby-core:65009] [Bug #10206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c: fix message as same as previous versionsnobu2014-09-132-2/+19
| | | | | | | * eval.c (rb_frozen_class_p): fix message for singleton class of class/module as same as previous versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* man/ruby.1: use https for *.ruby-lang.org linksnormal2014-09-132-2/+6
| | | | | | Avoid redirects which may be MitM-ed and slow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_yield.rb: use temporary instancenobu2014-09-131-1/+1
| | | | | | | * test/ruby/test_yield.rb (test_with_enum): use temporary instance, do not define a method on the global class object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (thread_alloc): remove needless volatilenormal2014-09-122-1/+5
| | | | | | | | If we needed a volatile there, every other alloc function would need it. There is nothing special I can see about thread_alloc which would justify it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc/env DATA_PTR is never NULLnormal2014-09-123-57/+36
| | | | | | | | | | | | | * proc.c (proc_free): remove, use RUBY_TYPED_DEFAULT_FREE (proc_mark, proc_memsize): remove needless branching * vm.c (env_free): remove, use RUBY_TYPED_DEFAULT_FREE (env_mark, env_memsize): remove needless branching This shows a tiny ~0.5% improvement in benchmark/bm_vm2_newlambda.rb but also removes a lot of code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2014-09-120-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c (rb_proc_alloc): inline and move to vm.cnormal2014-09-125-25/+59
| | | | | | | | | | | | | | | | | | | | | | | | | * proc.c (rb_proc_alloc): inline and move to vm.c (rb_proc_wrap): new wrapper function used by rb_proc_alloc (proc_dup): simplify alloc + copy + wrap operation [ruby-core:64994] * vm.c (rb_proc_alloc): new inline function (rb_vm_make_proc): call rb_proc_alloc * vm_core.h: remove rb_proc_alloc, add rb_proc_wrap * benchmark/bm_vm2_newlambda.rb: short test to show difference First we allocate and populate an rb_proc_t struct inline to avoid unnecessary zeroing of the large struct. Inlining speeds up callers as this takes many parameters to ensure correctness. We then call the new rb_proc_wrap function to create the object. rb_proc_wrap - wraps a rb_proc_t pointer as a Ruby object, but we only use it inside rb_proc_alloc. We must call this before the compiler may clobber VALUE parameters passed to rb_proc_alloc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Process.detach: avoid singleton class creationnormal2014-09-124-2/+28
| | | | | | | | | | | | | | | * process.c (Init_process): subclass Thread as Process::Waiter (rb_detach_process): use Process::Waiter instead of singleton class * test/ruby/test_process.rb (test_process_detach): new test * inits.c (rb_call_inits): call Init_Thread before Init_process to ensure Process::Waiter may be a subclass of Thread Thanks to headius for reporting [Bug #10231] Thanks to nobu for review of my initial patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-09-13svn2014-09-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e