summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-06-06* Move test cases from test/ruby/test_complex.rb to test/test_cmath.rbgogotanaka
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-05test/socket/test_nonblock.rb: try to avoid EMSGSIZEnormal
We want to test the IO::WaitWritable behavior, so silently discarding Errno::EMSGSIZE prevents the test from being effective. [ruby-core:69466] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-04* test/lib/envutil.rb (assert_no_memory_leak): change default valueko1
of limit from 1.5 to 2.0. It is ad-hoc fix to solve test failure in travis-ci. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-04FreeBSD raises Errno::EMSGSIZEnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-03dir.c: FNM_SHORTNAMEnobu
* dir.c (dirent_match): match short names only when FNM_SHORTNAME flag is given, for the backward compatibility, and the new behavior is often dangerous. [ruby-core:69435] [Bug #11206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-03variable.c: remove generic ivar support for special constantsnormal
Special constants are all frozen since [Feature #8923] and cannot support ivars. Remove some unused code we had for supporting them. * variable.c (special_generic_ivar): remove flag (givar_i, rb_mark_generic_ivar_tbl): remove functions (rb_free_generic_ivar, rb_ivar_lookup, rb_ivar_delete, generic_ivar_set, rb_ivar_set, rb_ivar_defined, rb_copy_generic_ivar, rb_ivar_foreach, rb_ivar_count, rb_obj_remove_instance_variable): adjust for lack of ivar support in special constants * test/ruby/test_variable.rb: test ivars for special consts * internal.h: remove rb_mark_generic_ivar_tbl decl * gc.c (gc_mark_roots): remove rb_mark_generic_ivar_tbl call git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02* vm_insnhelper.c (vm_defined): check respond_to_missing?ko1
at defined?(func()). * test/ruby/test_defined.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02* vm_insnhelper.c (vm_defined): skip respond_to_missing? whenko1
a method is available. [Bug #11211] * test/ruby/test_defined.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02* test/ruby/test_module.rb: Do not assume class variable order.eregon
Path by @enebo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02* method.h: make rb_method_entry_t a VALUE.ko1
Motivation and new data structure are described in [Bug #11203]. This patch also solve the following issues. * [Bug #11200] Memory leak of method entries * [Bug #11046] __callee__ returns incorrect method name in orphan proc * test/ruby/test_method.rb: add a test for [Bug #11046]. * vm_core.h: remvoe rb_control_frame_t::me. me is located at value stack. * vm_core.h, gc.c, vm_method.c: remove unlinked_method... codes because method entries are simple VALUEs. * method.h: Now, all method entries has own independent method definititons. Strictly speaking, this change is not essential, but for future changes. * rb_method_entry_t::flag is move to rb_method_definition_t::flag. * rb_method_definition_t::alias_count is now rb_method_definition_t::alias_count_ptr, a pointer to the counter. * vm_core.h, vm_insnhelper.c (rb_vm_frame_method_entry) added to search the current method entry from value stack. * vm_insnhelper.c (VM_CHECK_MODE): introduced to enable/disable assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02use assert_raisenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02test_nonblock.rb: skip if EPROTONOSUPPORTnobu
* test/socket/test_nonblock.rb (test_sendmsg_nonblock_seqpacket): OSX raises EPROTONOSUPPORT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02test/socket/test_nonblock.rb: new test for sendmsg_nonblocknormal
sendmsg_nonblock was not tested on any of my systems due to the common 64K limit. I also don't believe UDP sockets are at all a useful candidate for sendmsg_nonblock testing since they should never block on sending. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01test/ruby/test_complex.rb: Add test for CMath.log2gogotanaka
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31* test/ruby/test_gc.rb: increase timeout seconds for GC stressfulko1
debugging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31test_tempfile.rb: use assert_predicatenobu
* test/test_tempfile.rb: use assert_predicate and assert_not_predicate for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31test_tempfile.rb: use assert_filenobu
* test/test_tempfile.rb: use assert_file for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30* method.h: add VM_METHOD_TYPE_ALIAS rb_method_definition_t::typeko1
to fix [Bug #11173]. Now, inter class/method alias creates new method entry VM_METHOD_TYPE_ALIAS, which has an original method entry. * vm_insnhelper.c (find_defiend_class_by_owner): added. Search corresponding defined_class from owner class/module. * vm_method.c (rb_method_entry_get_without_cache): return me->klass directly for defined_class. Now, no need to check me->klass any more. * vm_method.c (method_entry_set0): separated from method_entry_set(). * vm_method.c (rb_alias): make method entry has VM_METHOD_TYPE_ALIAS. * vm_method.c (release_method_definition): support VM_METHOD_TYPE_ALIAS. * vm_method.c (rb_hash_method_definition): ditto. * vm_method.c (rb_method_definition_eq): ditto. * vm_method.c (release_method_definition): ditto. * vm_insnhelper.c (vm_call_method): ditto. * vm_insnhelper.c (vm_method_cfunc_entry): ditto. * vm_eval.c (vm_call0_body): ditto. * gc.c (mark_method_entry): ditto. * proc.c (method_def_iseq): ditto. * proc.c (method_cref): ditto. * proc.c (rb_method_entry_min_max_arity): ditto. * test/ruby/test_alias.rb: add tests. * test/ruby/test_module.rb: fix a test to catch up current behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30* lib/tempfile.rb (Remover#call): fixed wrong condition introduced atusa
r50682. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-29parse.y: check NTH_REF rangenobu
* compile.c (iseq_compile_each): out of range NTH_REF is always nil. * parse.y (parse_numvar): check overflow of NTH_REF and range. [ruby-core:69393] [Bug #11192] * util.c (ruby_scan_digits): make public and add length parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-28* ext/objspace/objspace.c: add two methods to debug internals.ko1
* ObjectSpace.internal_class_of: return RBASIC_CLASS(obj). * ObjectSpace.internal_super_of: return RCLASS_SUPER(cls). * NEWS: add information about both methods. * test/objspace/test_objspace.rb: add tests for both methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-28generator.c: allocate structs with wrappernobu
* ext/json/generator/generator.c (cState_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-28parser.rl: allocate structs with wrappernobu
* ext/json/parser/parser.rl (cJSON_parser_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-27test_bigdecimal.rb: adjustnobu
* test/bigdecimal/test_bigdecimal.rb (assert_no_memory_leak): fix GC scope and adjust limits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-27bigdecimal.c: wrapper object before allocnobu
* ext/bigdecimal/bigdecimal.c (VpNewRbClass): make wrapper object before result structs allocation and manage refcount for each elements to get rid of potential memory leak. * ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-27envutil.rb: EnvUtil.gc_stress_to_classnobu
* test/lib/envutil.rb (EnvUtil.gc_stress_to_class): check if GC.stress_to_class is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-26* vm_method.c (rb_alias): should resolve refined methods.shugo
[ruby-core:69360] [Bug #11182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-22* lib/prime.rb: Remove obsolete Prime.newmarcandre
patch by Ajay Kumar. [Fixes GH-891] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-22test_parse.rb: move assertionsnobu
* test/ruby/test_module.rb (test_remove_class_variable): move an assertion for Module#remove_class_variable from test_parse.rb. * test/ruby/test_symbol.rb (test_intern, test_all_symbols): move assertions for Symbol#intern and Symbol.all_symbols from test_parse.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-22* complex.c (f_complex_polar): simple bug reproduced only when y isusa
a float but x is not a float. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-22process.c: do not discard statusnobu
* process.c (rb_spawn_process): do not discard global escape status. [ruby-core:69304] [Bug #11166] * process.c (rb_execarg_spawn): extract the start procedure in a parent process with ensuring the end procedure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-21test_method.rb: add assertionnobu
* test/ruby/test_method.rb (test_to_proc_binding): assertion for dynamically set variable names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-21* proc.c: fix issues caused by binding created from Method#to_proc.ko1
[Bug #11163] * vm.c (vm_cref_new_toplevel): export as rb_vm_cref_new_toplevel(). * test/ruby/test_method.rb: add some assersions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-21* vm_method.c: Remove private attribute warning [Bug #10967]zzak
Patch by @spastorino [Fixes GH-849] https://github.com/ruby/ruby/pull/849 * test/ruby/test_module.rb: Update test for changes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-19iseq.c: check srouce typenobu
* iseq.c (rb_iseq_compile_with_option): check srouce type, must be an IO or a String. [ruby-core:69219] [Bug #11159] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-19numeric.c: Bignum 0 is not positivenobu
* numeric.c (num_positive_p): should false on Bignum 0. http://twitter.com/rafaelfranca/status/600509783427391488 [ruby-core:69173] [Feature #11151] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-19* lib/uri/rfc2396_parser.rb (initialize_pattern):naruse
URI::Generic.build should accept port as a string. pattern[:PORT] is not defined for long. by Dave Slutzkin <daveslutzkin@fastmail.fm> https://github.com/ruby/ruby/pull/804 fix GH-804 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-18test_nonblock.rb: refine failure messagenobu
* test/socket/test_nonblock.rb (test_accept_nonblock): refine assertion for better failure message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-18test_autoload.rb: use class_evalnobu
* test/ruby/test_autoload.rb (add_autoload): use class_eval instead of string eval. * test/ruby/test_autoload.rb (remove_autoload_constant): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-18intern.h: rb_f_notimplement for ext on Windowsnobu
* include/ruby/intern.h (rb_f_notimplement): should not respond to not-implemented methods. as the address inside a DLL and the imported address are different on Windows, use an exported variable to share the same address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-18* lib/monitor.rb (mon_try_enter, mon_enter): should reset @mon_countshugo
just in case the previous owner thread dies without mon_exit. [fix GH-874] Patch by @chrisberkhout git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17notimplement: renamenobu
* ext/-test-/notimplement, test/-ext-/test_notimplement.rb: rename from bug-3662. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17numeric.c: Numeric#positive? and Numeric#negative?nobu
* numeric.c (num_positive_p, num_negative_p): add methods Numeric#positive? and Numeric#negative?. [ruby-core:69173] [Feature #11151] * numeric.c (flo_positive_p, flo_negative_p): specialiazed functions for Float. * complex.c (Init_Complex): Complex do not have positive? and negative? methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17test_numeric.rb: separate dummy classesnobu
* test/ruby/test_numeric.rb: use separate dummy classes for each test cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17ext/socket/init.c: use SOCK_NONBLOCK if availablenormal
This saves a system call by allowing us to use SOCK_NONBLOCK in Linux when accept4 is available. Note: I do not agree accept_nonblock should always make accepted sockets non-blocking, and will propose a future API to allow controlling whether accepted sockets are non-blocking or not regardless of how they were created. * ext/socket/init.c (cloexec_accept): support nonblock flag and use SOCK_NONBLOCK if possible * ext/socket/init.c (rsock_s_accept_nonblock): update cloexec_accept call * ext/socket/init.c (accept_blocking): ditto for blocking * test/socket/test_nonblock.rb: check nonblock? on accepted socket [Feature #11138] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17default colorsnobu
* bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: shared the default colors from test/colors file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17reset colorsnobu
* bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: reset for each colors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16* load.c (loaded_feature_path): stop returning false negatives fortenderlove
filenames which are trailing substrings of file extensions. For example, 'b', which a trailing substring of ".rb" should not return false. [Bug #11155][ruby-core:69206] * test/ruby/test_autoload.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16fix test failures introduced in r50494tenderlove
This commit changes some of the `require` tests to run *without* rubygems enabled. Those particular tests were removing rubygems from $LOAD_PATH. These tests assert that a `LoadError` is raised. Unfortunately, since RubyGems was enabled by default and was not fully loaded, the load error actually originated from RubyGems, *not* from where the tests intended. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-14* lib/cgi/cookie.rb: Implement HttpOnly flag for cookies.xibbar
[fix GH-887] Patch by @martinpovolny git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e