summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2014-02-20* hash.c (rb_hash_flatten): fix behavior of flatten(0).glass
[ruby-dev:47988] [Bug #9533] * test/ruby/test_array.rb: test for above. patch is from Takeshi Sasaki. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-20* hash.c (rb_hash_flatten): fix behavior of flatten(-1).glass
[ruby-dev:47988] [Bug #9533] * test/ruby/test_array.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* test/ruby/test_gc.rb: ignore warning messages for running with -wko1
option such as chkbuild. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17marshal.c: do not recycle wrapper objectsnobu
* marshal.c (marshal_dump, marshal_load): do not recycle wrapper objects, to prevent from segfault with continuation. [ruby-dev:47970] [Bug #9523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* gc.c: introduce new environment variableko1
"RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR" to control major/minor GC frequency. Do full GC when the number of old objects is more than R * N where R is this factor and N is the number of old objects just after last full GC. * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14* enum.c: Enumerable#{min,min_by,max,max_by} extended to take anakr
optional argument. (nmin_cmp): New function. (nmin_block_cmp): Ditto (nmin_filter): Ditto. (nmin_i): Ditto. (nmin_run): Ditto. (enum_min): Call nmin_run if the optional argument is given. (nmin_max): Ditto. (nmin_min_by): Ditto. (nmin_max_by): Ditto. * range.c: Range#{min,max} extended to take an optional argument. (range_min): Call range_first if the optional argument is given. (range_max): Call rb_call_super if the optional argument is given. [ruby-core:57111] [Feature #8887] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13* vm_insnhelper.c (vm_call_method): should check ci->me->flag ofshugo
a refining method in case the method is private. [ruby-core:60111] [Bug #9452] * vm_method.c (make_method_entry_refined): set me->flag of a refined method entry to NOEX_PUBLIC in case the original method is private and it is refined as a public method. The original flag is stored in me->def->body.orig_me, so it's OK to make a refined method entry public. [ruby-core:60111] [Bug #9452] * test/ruby/test_refinement.rb: related tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13* test/ruby/test_array.rb: Ensure flatten! is used for test_flattenzzak
Patch by @ksss [Fixes GH-530] https://github.com/ruby/ruby/pull/530 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13parse.y: attrset from junk IDnobu
* parse.y (IDSET_ATTRSET_FOR_INTERN): fix off-by-one bug. * parse.y (rb_enc_symname_type): junk ID succeeded by '=' is also attrset ID. [ruby-core:60668] [Bug #8756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12test_rubyoptions.rb: just check if abortednobu
* test/ruby/test_rubyoptions.rb (test_segv_loaded_features): ignore message at segv, just check if aborted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12error.c: Crash Report lognobu
* error.c (REPORTBUG_MSG): mention about Crash Report log file on MacOS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-08marshal.c: Numerics are not taintednobu
* include/ruby/ruby.h (OBJ_TAINTABLE, OBJ_TAINT, OBJ_INFECT), marshal.c (r_entry0): all Numerics never be tainted now. [ruby-core:57346] [Bug #8945] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-06test_marshal.rb: fix test depending on heap addressnobu
* test/ruby/test_marshal.rb (test_packed_string): explicitly force encoding for the case packed string is 7bit ASCII only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05pack.c: hide associated objectsnobu
* marshal.c (to_be_skipped_id): ignore anonymous attributes. * pack.c (Init_pack): use anonymous ID so that associated objects do not appear in the packed result. * parse.y (rb_make_internal_id): return an anonymous ID for internal use. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05parse.y: symbol names must be ascii-compatiblenobu
* parse.y (rb_enc_symname_type): encoding of symbol names must be ascii-compatible, reject ascii-incompatible encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04dir.c: glob cases on case-insensitive systemnobu
* dir.c (glob_helper): return the filename with actual cases on the filesystem if it is case-insensitive. [ruby-core:42469] [Feature #5994] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04pack.c: use ivar for associated objectsnobu
* pack.c (str_associate, str_associated): keep associated objects in an instance variables, instead of in the internal structure. * string.c (rb_str_associate, rb_str_associated): deprecate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04string.c: enable capacity when setting capanobu
* string.c (rb_str_modify_expand): enable capacity and disable assocation with packed objects when setting capa, so that pack("p") string fails to unpack properly after modified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04Revert "dir.c: glob cases on case-insensitive system"naruse
This reverts commit r44796. * dir.c (glob_helper): return the filename with actual cases on the filesystem if it is case-insensitive. [ruby-core:42469] [Feature #5994] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-03dir.c: glob cases on case-insensitive systemnobu
* dir.c (glob_helper): return the filename with actual cases on the filesystem if it is case-insensitive. [ruby-core:42469] [Feature #5994] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-30object.c: error message encodingnobu
* object.c (convert_type, rb_convert_type, rb_check_convert_type), (rb_to_integer): preserve class name encoding error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-30test_exception.rb: ignore SystemStackErrornobu
* test/ruby/test_exception.rb (test_machine_stackoverflow_by_define_method): ignore propagated SystemStackError, as well as test_machine_stackoverflow, which has not bee rescued in the child process by unknown reason. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-27thread_pthread.c: get current main thread stack sizenobu
* thread_pthread.c: get current main thread stack size, which may be expanded than allocated size at initialization, by rlimit(). [ruby-core:60113] [Bug #9454] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-25compile.c: assignment result of aset_withnobu
* compile.c (iseq_compile_each): result of assignment should be its rhs instead of returned value from a method. [ruby-core:60071] [Bug #9448] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-24test_process.rb: clock_getres may not supportednobu
* test/ruby/test_process.rb (test_clock_getres): ignore if clock_getres is no supported, e.g., on old Linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-23* test/ruby/envutil.rb: try to wait a bit (0.1sec) when ruby processko1
exits by signals because some SEGV tests fail because of not enough error output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-23* test/ruby/test_settracefunc.rb: check the target thread.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-23* test/ruby/test_settracefunc.rb: check the target thread.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-23test_process.rb: fix conditionnobu
* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking): fix condition to define. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-23test_process.rb: deadlock testnobu
* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking): test for r44687, deadlock in rb_fork_internal(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18* compar.c (cmp_equal): warn for this release and still rescueeregon
standard exceptions for a nicer transition. See #7688. Partly reverts r44502. * test/ruby/test_comparable.rb: adapt assertion to match new behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18* test/ruby/test_comparable.rb: specify behavior for the differenteregon
kind of exceptions rescued (or not) by Comparable#==. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-17eval.c: singleton class constantsnobu
* eval.c (rb_mod_s_constants): return its own constants for other than Module itself. [ruby-core:59763] [Bug #9413] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-16test_thread.rb: stop at oncenobu
* test/ruby/test_thread.rb (test_priority): stop both threads at once by a flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15test_gc.rb: relax assertionnobu
* test/ruby/test_gc.rb (test_profiler_total_time): GC time may be shorter than the timer resolution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15test_numeric.rb: default_externalnobu
* test/ruby/test_numeric.rb (test_coerce): manage Encoding.default_external. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15numeric.c: preserve encodingnobu
* numeric.c (num_init_copy): preserve encoding of error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15numeric.c: preserve encodingnobu
* numeric.c (num_sadded): preserve encoding of error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15numeric.c: preserve encodingnobu
* numeric.c (coerce_failed): preserve encoding of error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15test_numeric.rb: coercion failuresnobu
* test/ruby/test_numeric.rb (test_coerce): new assertions for failure of coercion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15string.c: respect BOMnobu
* string.c (get_encoding): respect BOM on pseudo encodings. [ruby-dev:47895] [Bug #9415] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15string.c: use actual encodingsnobu
* string.c (get_actual_encoding): get actual encoding according to the BOM if exists. * string.c (rb_str_inspect): use according encoding, instead of pseudo encodings, UTF-{16,32}. [ruby-core:59757] [Bug #8940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15test_m17n.rb: split tests for inspectnobu
* test/ruby/test_m17n.rb (test_utf_16_32_inspect): split tests for each encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-10test_super.rb: remove unneeded codenobu
* test/ruby/test_super.rb (test_missing_super_in_module_unbound_method): binding target does not need extending. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-10insns.def: add opt path for Hash#[] and Hash#[]= used with str literal keystmm1
* insns.def (opt_aref_with): new instruction to optimize Hash#[], removing any allocation overhead when used with a string literal key. Patch by normalperson (Eric Wong). [ruby-core:59640] [Bug #9382] * insns.def (opt_aset_with): new instruction to optimize Hash#[]= * compile.c (iseq_compile_each): compiler shortcuts for new instructions * hash.c (static VALUE rb_hash_compare_by_id_p): fix documentation for Hash#compare_by_identity to reflect frozen string sharing * test/ruby/test_hash.rb (class TestHash): test for new behavior git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09* vm.c (rb_vm_pop_cfunc_frame): added. It cares c_return event.ko1
The patch base by drkaes (Stefan Kaes). [Bug #9321] * variable.c (rb_mod_const_missing): use rb_vm_pop_cfunc_frame() instead of rb_frame_pop(). * vm_eval.c (raise_method_missing): ditto. * vm_eval.c (rb_iterate): ditto. * internal.h (rb_vm_pop_cfunc_frame): add decl. * test/ruby/test_settracefunc.rb: add tests. provided by drkaes (Stefan Kaes). * vm.c, eval.c, include/ruby/intern.h (rb_frame_pop): move definition of rb_frame_pop() and deprecate it. It doesn't care about `return' events. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-08vm_insnhelper.c: revive r44455 for bound module methodnobu
* vm_insnhelper.c (vm_search_super_method): when super called in a bound UnboundMethod generated from a module, no superclass is found since the current defined class is the module, then call method_missing in that case. [ruby-core:59619] [Bug #9377] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-08object.c: hash value from objid with saltnobu
* hash.c (rb_objid_hash): return hash value from object ID with a salt, extract from rb_any_hash(). * object.c (rb_obj_hash): return same value as rb_any_hash(). fix r44125. [ruby-core:59638] [Bug #9381] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-06array.c: return first unique element in Array#uniqtmm1
* array.c (ary_add_hash): Fix consistency issue between Array#uniq and Array#uniq! [Bug #9340] [ruby-core:59457] * test/ruby/test_array.rb (class TestArray): regression test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-06test_super.rb: test_module_super_in_method_modulenobu
* test/ruby/test_super.rb (test_module_super_in_method_module): more test for the case searching super method from a method defined in a module. [ruby-core:59589] [Bug #9315] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e