summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-10-23* lib/ostruct.rb: Raise RuntimeError when modifying frozen instancesmarcandre
instead of TypeError. Patch by Kenichi Kamiya. [Fixes GH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* array.c: Add Array#to_h [Feature #7292]marcandre
* enum.c: Add Enumerable#to_h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* 2013-10-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* gc.c: Rename free_min to min_free_slots and free_min_page to ↵tmm1
max_free_slots. The algorithm for heap growth is: if (swept_slots < min_free_slots) pages++ if (swept_slots > max_free_slots) pages-- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23Makefile.sub: C99 mathematics functionsnobu
* win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics functions. [ruby-core:57981] [Bug #9044] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* gc.c: move increment from heap to heap_pages.ko1
Share `increment' information with heaps. * gc.c: change ratio of heap_pages_free_min_page to 0.80. This change means slow down page freeing speed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* gc.c (heap_pages_free_unused_pages): cast to (int) for size_tko1
variable `i'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* gc.c: introduce tomb heap.ko1
Tomb heap is where zombie objects and ghost (freed slot) lived in. Separate from other heaps (now there is only eden heap) at sweeping helps freeing pages more efficiently. Before this patch, even if there is an empty page at former phase of sweeping, we can't free it. Algorithm: (1) Sweeping all pages in a heap and move empty pages from the heap to tomb_heap. (2) Check all exsisting pages and free a page if all slots of this page are empty and there is enough empty slots (checking by swept_num) To introduce this pach, there are several tuning of GC parameters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* gc.c (gc_prof_sweep_timer_stop): catch up recent changesko1
to compile on GC_PROFILE_MORE_DETAIL=1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* file.c: [DOC] fix rdoc format of File#expand_path from r43386zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22* 2013-10-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22 * vm_core.h (enum): avoid syntax error.shyouhei
* method.h: ditto. * internal.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22* gc.c (Init_heap): move logics from heap_pages_init() and removeko1
heap_pages_init(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22* gc.c: allow multiple heaps.ko1
Now, objects are managed by page. And a set of pages is called heap. This commit supports multiple heaps in the object space. * Functions heap_* and rb_heap_t manages heap data structure. * Functions heap_page_* and struct heap_page manage page data strcuture. * Functions heap_pagse_* and struct rb_objspace_t::heap_pages maintains all pages. For example, pagaes are allocated from the heap_pages. See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design and https://bugs.ruby-lang.org/attachments/4015/data-heap_structure_with_multiple_heaps.png for more deitals. Now, there is only one heap called `eden', which is a space for all new generated objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22* lib/pp.rb (object_address_group): Use Kernel#to_s to obtain the classakr
name and object address. This fix a problem caused by %p in C generates variable length address. Reported by ko1 via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22* file.c (File#expand_path): [DOC] improve documentation of File#expand_path.eregon
Based on patch by Prathamesh Sonpatki. [ruby-core:57734] [Bug #9002] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22dir.c: DOTMATCH to current directorynobu
* dir.c (glob_helper): don't skip current directories if FNM_DOTMATCH is given. [ruby-core:53108] [Bug #8006] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22* vm_trace.c: exterminate Zombies.ko1
There is a bug that T_ZOMBIE objects are not collected. Because there is a pass to miss finalizer postponed job with multi-threading. This patch solve this issue. * vm_trace.c (rb_postponed_job_register_one): set RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(th) if another same job is registered. There is a possibility to remain a postponed job without interrupt flag. * vm_trace.c (rb_postponed_job_register_one): check interrupt carefully. * vm_trace.c (rb_postponed_job_register_one): use additional space to avoid buffer full. * gc.c (gc_finalize_deferred_register): check failure. * thread.c (rb_threadptr_execute_interrupts): check `postponed_job_interrupt' immediately. There is a possibility to miss this flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22configure.in: check CFLAGS and LDFLAGSnobu
* configure.in: check if the given CFLAGS and LDFLAGS are working, and bail out early if not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22internal.h: fix typonobu
* internal.h (rb_syserr_fail_path): fix typo on platforms where function name string predefined identifier is not supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21dir.c: warn Dir.exists?nobu
* dir.c (rb_dir_exists_p): warn deprecated name. [Bug #9041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21* file.c (rb_file_exists_p): maybe FileTest.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21* 2013-10-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21file.c: warn File.exists?nobu
* file.c (rb_file_exists_p): warn deprecated name. [Bug #9041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21encoding.c: preserve outer errinfonobu
* encoding.c (load_encoding): should preserve outer errinfo, so that expected exception may not be lost. [ruby-core:57949] [Bug #9038] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21* 2013-10-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21assertions.rb: fix omitted messagenobu
* lib/test/unit/assertions.rb (assert_raise_with_message): remove omitted message by splatting nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-20io.c: make IO#reopen("pathname") atomicnobu
* io.c (rb_io_reopen): create a new, temporary FD via rb_sysopen and call rb_cloexec_dup2 on it to atomically replace the file fptr->fd points to. This leaves no possible window where fptr->fd is invalid to userspace (even for any threads running w/o GVL). based on the patch by Eric Wong <normalperson@yhbt.net> at [ruby-core:57943]. [Bug #9036] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-20internal.h: rb_syserr_fail_pathnobu
* error.c (rb_syserr_fail_path_in): new function split from rb_sys_fail_path_in to raise SystemCallError without errno. * internal.h (rb_syserr_fail_path): like rb_sys_fail_path but without errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-20internal.h: remove stale declarationnobu
* internal.h (rb_w32_init_file): no longer defined since r43362. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-20ruby.h: suppress warningsnobu
* include/ruby/ruby.h (rb_obj_wb_unprotect, rb_obj_written), (rb_obj_write): suppress unused-parameter warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-20* lib/rubygems: Update RubyGems to master 0886307. This commitdrbrain
improves documentation and should bring ruby above 75% documented on rubyci. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-20* lib/rubygems: Update to RubyGems master 3de7e0f. Changes:drbrain
Only attempt to build extensions for newly-installed gems. This prevents compilation attempts at gem activation time for gems that already have extensions built. Fix crash in the dependency resolver for dependencies that cannot be resolved. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19variable.c: real class namenobu
* variable.c (rb_class2name): should return real class name, not singleton class or iclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19* 2013-10-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19* variable.c (rb_class2name): call rb_tmp_class_path() directly to avoid ↵tmm1
extra rb_str_dup() from rb_class_name(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19encdb.h.tmpl: remove stale macrosnobu
* template/encdb.h.tmpl: remove stale ENCIDX macros which never been used, ENCINDEX enums is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19win32/file.c: code page tablenobu
* win32/file.c (code_page): use simple array instead of st_table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19encoding.c: defer code page tablenobu
* encoding.c (rb_locale_encindex): defer initialization of win32 code page table until encoding db loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18gc.c: fix aritynobu
* gc.c (Init_GC): fix arity of key? method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18* gc.c: fix rb_objspace_t.ko1
* make "struct heap" and move most of variables in rb_objspace_t::heap. * rename rb_objspace_t::heap::sorted to rb_objspace_t::heap_sorted_pages and make a macro heap_sorted_pages. * rename rb_objspace_t::heap::range to rb_objspace_t::heap_range and rename macros lomem/himem to heap_lomem/heap_himem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18* lib/rubygems: Update to RubyGems master 42543b6. Changes:drbrain
Fix `gem update` for gems with multiple platforms. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18* 2013-10-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18* lib/rubygems: Update to RubyGems master 0a3814b. Changes:drbrain
Fixed extension directory in Gem::Specification#require_paths. Allow installation of gems when $HOME is nonexistent or unwritable. Use proper API in InstallCommand. Improve support for path option in gem dependency files. Remove warnings. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18ruby_atomic.h: suppress a warningnobu
* ruby_atomic.h (ATOMIC_SIZE_SUB): add cast to suppress a warning by VC++. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18resolv.rb: workaround for recent Rubygemsnobu
* lib/resolv.rb (Resolv::Hosts): get rid of load error in require which causes recent Rubygems to build all extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18* gc.c (wmap_inspect_i): fix inspect format.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18* gc.c (wmap_inspect_i): fix callback argument.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e