summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2015-01-02* test/ruby/test_module.rb: Refactor invalid testcase.hsbt
[fix GH-472][ruby-core:59035][Bug #9240] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02test_yield.rb: assert_all_sentencesnobu
* test/ruby/test_yield.rb (assert_all_sentences): test all sentences and report all results at the end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02test_m17n.rb: split test_scrubnobu
* test/ruby/test_m17n.rb (TestM17N#test_scrub): split into some tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01test_rubyoptions.rb: locale namenobu
* test/ruby/test_rubyoptions.rb: try locale encoding name. [ruby-core:67109] [Bug #10643] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01symbol.c: fix memory leak from global fstr hashnormal
* symbol.c (rb_gc_free_dsymbol): delete from global fstr hash * test/ruby/test_symbol.rb (test_symbol_fstr_leak): test for bug [ruby-core:67268] [Bug #10686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01vm_args.c: fix non-symbol keys hashnobu
* vm_args.c (keyword_hash_p): fix non-symbol keys hash. rb_extract_keywords() returns 0 not Qnil when no symbol keys is included. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-31parse.y: disable past scope warningsnobu
* parse.y (gettable_gen): disable warnings of possible reference to a local variable defined in a past scope. [ruby-core:67162] [Bug #10661] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29re.c: append excape sequence as-isnobu
* re.c (unescape_nonascii): append excape sequence as-is not unescaped character, to get rid of unexpected meta-character. [ruby-core:67193] [Bug #10670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29thread.c: fix dynamic symbol keysnobu
* thread.c (rb_thread_variable_get): fix dynamic symbol keys. rb_check_id() returns non-zero only for static symbols, whereas thread local variable keys can be dynamic symbols. [ruby-core:67185] [Bug #10667] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28test_extlibs.rb: show mkmf.lognobu
* test/ruby/test_extlibs.rb (check_existence): show mkmf.log of failed extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28parse.y: fix internal IDs conflictnobu
* parse.y (f_kwrest, new_args_tail_gen): unnamed rest keyword and keywords bits arguments should be unique. since internal IDs depend on the local variable index in the current scope, new ID should be made before popping those vtables. [ruby-core:67157] [Bug #10659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-26* test/ruby/test_extlibs.rb: test in separated process for mathn/*.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25s/existance/existencezzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25don't require mathn, it breaks the worldnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25remove old empty directories.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25* test/ruby/test_extlibs.rb: check existance of extension librariesusa
which not depend on outer libraries. (experimental) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25file.c: drop ignored charsnobu
* file.c (rb_file_expand_path_internal): drop characters ignored by filesystem on Mac OS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25dir.c: replace_real_basenamenobu
* dir.c (replace_real_basename): get the real name and replace the base name with it by getattrlist(2) if available. suggested by Matthew Draper at [ruby-core:67116]. [Bug #10015] * dir.c (glob_helper): get the real name of the whole path, not only the last name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25parse.y: warn past scope variablenobu
* parse.y (gettable_gen): warn possible reference to a local variable defined in a past scope. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24test_gc.rb: termsignobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): also check termsig to ensure killed by SIGINT. and try SIGSEGV to dump something. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19* test/ruby/test_rubyoptions.rb: (TestRubyOptions#test_verbose): support RC.usa
see also r48888. reported by Vit Ondruch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_version): should supportusa
rc :-P git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-18test/ruby/test_iseq.rb: spelling fix: s/diable/disable/normal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-17* compile.c (iseq_compile_each): checkko1
iseq->compile_data->option->specialized_instruction for opt_* insn. * test/ruby/test_iseq.rb: check no specialized_instructions option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-17compile.c: skip opt_* insns for fstr args with block givennormal
* compile.c (iseq_compile_each): only emit opt_str_freeze, opt_aref_with, and opt_aset_with insn when no block is given [Bug #10557] [ruby-core:66595] * test/ruby/test_optimization.rb (test_block_given_aset_aref): new test for bug thanks to Bartosz Kopinski. (test_string_freeze): additional assertion for object_id git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-16iseq.c: struct accessorsnobu
* iseq.c (rb_method_for_self_aref, rb_method_for_self_aset): call accessor functions directly, not to be affected by [] and []= methods. [ruby-core:66846] [Bug #10601] * struct.c (define_aref_method, define_aset_method): ditto. * vm_insnhelper.c (rb_vm_opt_struct_aref, rb_vm_opt_struct_aset): direct accessors of Struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-16test_rubyoptions.rb: clean crash lognobu
* test/ruby/test_rubyoptions.rb (test_segv_loaded_features): clean crash log on OS X after intentional segv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-16* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):ko1
extend timeout seconds to 60 for RGENGC_CHECK_MODE > 0 environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15* test/ruby/test_time.rb: Add test for getlocal(nil). Seeheadius
jruby/jruby#2310. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15* test/ruby/test_io_m17n.rb: Add test for coderange clearing inheadius
IO#read with buffer. See jruby/jruby#2316. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15* ext/objspace/objspace.c: ObjectSpace.memsize_of(obj) returnsko1
with sizeof(RVALUE). [Bug #8984] * gc.c (obj_memsize_of): ditto. * NEWS: add a NEWS entry. * test/objspace/test_objspace.rb: catch up this fix. * test/ruby/test_file_exhaustive.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15string.c: fix coderange for non-endianness stringnobu
* string.c (rb_enc_str_coderange): dummy wchar, non-endianness encoding string cannot be ascii only. [ruby-core:66835] [Bug #10598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15comment out for x86 extended precisionnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-14parse.y: warn reference after method definitionnobu
* parse.y (primary): restore current_arg so that circular reference after a method definition is also warned. [ruby-core:61299] [Bug #9593] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13test_gc.rb: workaround for Windowsnobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): use inner process signal for Windows. [ruby-core:66825] [Bug #10595] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13test_gc.rb: waitnobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): wait longer and send more interrupts for slower cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13vm_trace.c: defer interrupts while postponed jobsnobu
* vm_trace.c (rb_postponed_job_flush): mask signal trap interrupt too to defer handling after finalizers finished. [ruby-core:66825] [Bug #10595] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13test_object.rb: no RSS checknobu
* test/ruby/test_object.rb (test_copied_ivar_memory_leak): ignore RSS to disable false failure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12string.c: check arguments for cryptnobu
* string.c (rb_str_crypt): check arguments more strictly. * crypt() is not for wide char strings * salt bytes should not be NUL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-11test_process.rb: splitnobu
* test/ruby/test_process.rb (test_execopts_redirect): split large test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-09struct: avoid all O(n) behavior on accessnormal
This avoids O(n) on lookups with structs over 10 members. This also avoids O(n) behavior on all assignments on Struct members. Members 0..9 still use existing C methods to read in O(1) time Benchmark results: vm2_struct_big_aref_hi* 1.305 vm2_struct_big_aref_lo* 1.157 vm2_struct_big_aset* 3.306 vm2_struct_small_aref* 1.015 vm2_struct_small_aset* 3.273 Note: I chose use loading instructions from an array instead of writing directly to linked-lists in compile.c for ease-of-maintainability. We may move the method definitions to prelude.rb-like files in the future. I have also tested this patch with the following patch to disable the C ref_func methods and ensured the test suite and rubyspec works --- a/struct.c +++ b/struct.c @@ -209,7 +209,7 @@ setup_struct(VALUE nstr, VALUE members) ID id = SYM2ID(ptr_members[i]); VALUE off = LONG2NUM(i); - if (i < N_REF_FUNC) { + if (0 && i < N_REF_FUNC) { rb_define_method_id(nstr, id, ref_func[i], 0); } else { * iseq.c (rb_method_for_self_aref, rb_method_for_self_aset): new methods to generate bytecode for struct.c [Feature #10575] * struct.c (rb_struct_ref, rb_struct_set): remove (define_aref_method, define_aset_method): new functions (setup_struct): use new functions * test/ruby/test_struct.rb: add test for struct >10 members * benchmark/bm_vm2_struct_big_aref_hi.rb: new benchmark * benchmark/bm_vm2_struct_big_aref_lo.rb: ditto * benchmark/bm_vm2_struct_big_aset.rb: ditto * benchmark/bm_vm2_struct_small_aref.rb: ditto * benchmark/bm_vm2_struct_small_aset.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-09thread.c: get rid of invalid ID symbolnobu
* eval.c (rb_frame_last_func): return the most recent frame method name. * thread.c (recursive_list_access): use the last method name, instead of the current method name which can be unset in some cases, not to use a symbol by the invalid ID. [ruby-core:66742] [Bug #10579] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05test_rubyoptions.rb: non-codepage names globnobu
* test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): more assertion for fallback replacement on non-codepage names. [ruby-dev:48752] [Bug #10555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05test_rubyoptions.rb: non-codepage names globnobu
* test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): test for command line globbing on non-codepage names. [ruby-dev:48752] [Bug #10555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05parse.y: fix lex_state after tLABEL_ENDnobu
* parse.y (parser_yylex): fix lex_state after tLABEL_END, should be EXPR_LABELARG to be followed by "paren with arg". [ruby-core:66705] [Feature #4935] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03iseq.c: avoid segfault on incomplete iseqnormal
Compile failures will trigger iseq_free before iseq->callinfo_entries are allocated at all. * iseq.c (iseq_free): avoid segfault on incomplete iseq * test/ruby/test_syntax.rb (test_invalid_next): new test for syntax error, not segfault git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-02* test/ruby/test_eval.rb: add case to test "sticky" instance_evalheadius
self when passed a reified block (proc/lambda). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-30* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):akr
Don't raise Interrupt. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-30* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking): Useakr
assert_separately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29ruby.c: transcode program namesnobu
* ruby.c (process_options, ruby_script): transcode script name and program name to locale encoding as well as argv. [ruby-dev:48752] [Bug #10555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e