summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2014-07-24* gc.c: fix major GC flags.ko1
* add GPR_FLAG_MAJOR_BY_FORCE, which indicates major GC by METHOD, CAPI and so on (see GC_BY). * remove GPR_FLAG_MAJOR_BY_RESCAN because not used. * remove GPR_FLAG_MAJOR_BY_STRESS, use FORCE instead. * test/ruby/test_gc.rb: catch up. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23time.c: unnecessary encodingnobu
* time.c (time_zone_name): remove unnecessary encoding and conversion if it is 7bit-ascii only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23test_time.rb: encoding of Time#zonenobu
* test/ruby/test_time.rb (assert_zone_encoding): encoding of Time#zone is not locale, but the default internal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-22string.c: raise at invalid byte sequencenobu
* string.c (rb_str_count): raise at invalid byte sequence argument even if single-byte optimization is effective. [ruby-dev:48442] [Bug #10078] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-22string.c: fix wrong single-byte optimizationnobu
* string.c (rb_str_count): fix wrong single-byte optimization. 7bit ascii can be a trailing byte in Shift_JIS. [ruby-dev:48442] [Bug #10078] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20* test/ruby/test_module.rb: Bump up timeout inheadius
test_prepend_visibility_inherited for slow or heavily-loaded systems or slower-launching impls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-19compile.c: private reader in op_assignnobu
* compile.c (iseq_compile_each): allow to access private attribute reader in op_assign. [ruby-core:63817] [Bug #10060] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18optimized any? methodsnobu
* array.c (rb_ary_any_p), hash.c (rb_hash_any_p): optimized versions. these are bit faster than optimization in Enumerable#any?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15test/ruby/test_env.rb: test memory leaks only on Windowsnobu
* test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}): test for Windows platform specific code. (test_memory_crash_select): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11* test/ruby/envutil.rb (assert_no_memory_leak): On Solaris 9 or later,ngoto
if possible, execute child ruby with environment variables LD_PRELOAD=libumem.so UMEM_OPTIONS="backend=mmap". With these variables, freed memory is immediately returned to the OS. [Bug #10020] [ruby-dev:48391] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11pack.c: fix buffer overrunnobu
* pack.c (encodes): fix buffer overrun by tail_lf. Thanks to Mamoru Tasaka and Tomas Hoger. [ruby-core:63604] [Bug #10019] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-10vm_insnhelper.c: fix implicit splat keyword argumentnobu
* vm_insnhelper.c (vm_callee_setup_keyword_arg): adjust VM stack pointer to get rid of overwriting splat arguments by arguments for `to_hash` conversion. [ruby-core:63593] [Bug #10016] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09test_io.rb: fix assertionnobu
* test/ruby/test_io.rb (test_advise): fix inverted arguments order by assert_nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09require "rbconfig" to use RbConfignaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08memory_status.rb: find proper psnobu
* test/ruby/memory_status.rb (Memory::PSCMD): use ps command which outputs expected result. [ruby-dev:48370] [Bug #10010] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07test/ruby/find_executable.rbnobu
* test/ruby/test_rubyoptions.rb (test_program_name): use expected ps command from PATH. * test/ruby/find_executable.rb (EnvUtil#find_executable): find expected executable path with argument and output pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-02test_io.rb: fix leaked threadsnobu
* test/ruby/test_io.rb (test_readpartial_locktmp): ensure reading thread is dead to fix leaked threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01vm.c: rb_vm_env_local_variablesnobu
* vm.c (rb_vm_env_local_variables): returns array of local variable name symbols in the environment by envval. * proc.c (bind_local_variables): use rb_vm_env_local_variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01proc.c: Binding#receivernobu
* proc.c (bind_receiver): new method to return the bound receiver of the binding object. [ruby-dev:47613] [Feature #8779] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01proc.c: fix infinite loopnobu
* proc.c (bind_local_variables): update env from envval for each iterations. [ruby-dev:48351] [Bug #10001] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01test_proc.rb: test_local_variablesnobu
* test/ruby/test_proc.rb (test_local_variables): missing test for Binding#local_variables. [Feature #8773] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01test_proc.rb: test_local_variables_in_other_contextnobu
* test/ruby/test_proc.rb (test_local_variables_in_other_context): move from test_variable.rb, this is a test for the method of Binding, not of Kernel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30* gc.c: support `USE_RGENGC == 0'.ko1
* test/ruby/test_gc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28test_env.rb: relax limitsnobu
* test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}): increase rehearsals and memory leak limits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28eval.c: no overwrite SystemStackError backtracenobu
* eval.c (setup_exception): should not overwrite SystemStackError backtrace if set already. [ruby-core:63377] [Feature #6216] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28eval.c: no method calls at stack overflownobu
* eval.c (setup_exception): get rid of method calls before raising stack overflow, not to cause stack overflow again. * defs/id.def: add IDs for backtraces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27test_env.rb: rehearsalnobu
* test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}): have a rehearsal before the main loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26hash.c: fix memory leaknobu
* hash.c (env_shift): fix memory leak on Windows, free environment strings block always. [ruby-dev:48332] [Bug #9983] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26sprintf.c: unnumbered asterisk with numbered argumentnobu
* sprintf.c (GETASTER): should not use the numbered argument to be formatted, raise ArgumentError instead. [ruby-dev:48330] [Bug #9982] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26sprintf.c: remove extra parenthesesnobu
* sprintf.c (GETASTER): remove extra parentheses from the second argument so that the error message does not contain them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25hash.c: fix memory leaknobu
* hash.c (env_select): fix memory leak and crash on Windows, make keys array first instead of iterating on envrion directly. [ruby-dev:48325] [Bug #9978] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25eval_error.c: newline alwaysnobu
* eval_error.c (error_print): put a newline after an anonymous exception class name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25hash.c: fix memory leaknobu
* hash.c (ruby_setenv): fix memory leak on Windows, free environment strings block after check for the size. [ruby-dev:48323] [Bug #9977] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25hash.c: prohibit tainted stringsnobu
* hash.c (env_aset, env_has_key, env_assoc, env_has_value), (env_rassoc, env_key): prohibit tainted strings if $SAFE is non-zero. [Bug #9976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-24hash.c: frozen PATH envnobu
* hash.c (env_path_str_new): make PATH environment variable string, to be frozen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23Backtrace for SystemStackErrornobu
* eval.c (setup_exception): set backtrace in system stack error other than the pre-allocated sysstack_error. [Feature #6216] * proc.c (Init_Proc): freeze the pre-allocated sysstack_error. * vm_insnhelper.c (vm_stackoverflow): raise new instance for each times without calling any methods to keep the backtrace with no further stack overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-20test_regexp.rb: split test_oncenobu
* test/ruby/test_regexp.rb (test_once): split for each cases than separating by comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-20test_regexp.rb: assert prefixnobu
* test/ruby/test_regexp.rb: rename and prefix `assert_` to show caller method names in backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-20test_optimization.rb: redefine separatelynobu
* test/ruby/test_optimization.rb (assert_redefine_method): redefine optimized methods in separate processes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-19* test/ruby/test_settracefunc.rb: rewrite tests withko1
assert_consistent_call_return(). assert_consistent_call_return() is also modified to check consistency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-19* compile.c (rb_iseq_compile_node): put start label of block afterko1
trace (b_call). [Bug #9964] * test/ruby/test_settracefunc.rb: add a test. added assert_consistent_call_return() method check call/return consistency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-19* vm.c (rb_vm_rewind_cfp): add new function to rewind specified cfpko1
with invoking RUBY_EVENT_C_RETURN. [Bug #9961] * vm_core.h: ditto. * eval.c (rb_protect): use it. * eval.c (rb_rescue2): ditto. * vm_eval.c (rb_iterate): ditto. * test/ruby/test_settracefunc.rb: add a test. * vm_core.h (rb_name_err_mesg_new): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-19* vm.c (invoke_block_from_c): move call/return event timing forko1
bmethod. It can invoke inconsistent call event if this call raises argument error. [Bug #9959] * vm_insnhelper.c (vm_call_bmethod_body): ditto. * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-19* vm_core.h: add VM_FRAME_MAGIC_RESCUE to recognize normal block orko1
rescue clause. * vm.c (vm_exec): use VM_FRAME_MAGIC_RESCUE on at rescue/ensure. * test/ruby/test_settracefunc.rb: should not invoke b_return at rescue clause. [Bug #9957] * vm_dump.c (control_frame_dump): check VM_FRAME_MAGIC_RESCUE. * vm_dump.c (vm_stack_dump_each): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-19proc.c: Implement Method#currynobu
* proc.c (rb_method_curry): Implement Method#curry, which delegates to to_proc.curry. [ruby-core:62212] [Feature #9783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-17eval.c: pass unknown optionsnobu
* eval.c (extract_raise_opts): pass unknown options to the exception, so that exception class can receive a hash argument. [ruby-core:63203] [Feature #8257] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-16process.c: use UTF-8nobu
* process.c (open): use UTF-8 version function to support non-ascii path properly. [ruby-core:63185] [Bug #9946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-15test_file_exhaustive.rb: fix expected valuenobu
* test/ruby/test_file_exhaustive.rb (test_expand_path_memsize): correct expected value, count terminator byte. [Bug #9934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-15test_file_exhaustive.rb: fix assertionnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path_memsize): wrong expected value, considering a prefix (drive letter or UNC) on DOSISH platforms. [Bug #9934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-14array.c: non-recursive rcombinate0nobu
* array.c (rcombinate0): remove recursion, by looping with indexes stored in `p`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e