summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-06-14* enum.c (enum_chunk_while): New method Enumerable#chunk_while.akr
[ruby-core:67738] [Feature #10769] proposed by Tsuyoshi Sawada. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14file.c: open without gvlnobu
* file.c (rb_file_load_ok): try opening file without gvl not to lock entire process. [Bug #11060] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14* test/test_unicode_normalize.rb: get rid of a warning.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* test/ruby/test_io.rb: add test for IO.binread fd leak.eregon
See r50881. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* test/lib/leakchecker.rb (check): refactor.eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* test/lib/leakchecker.rb: Return false for no leaks.eregon
Otherwise the GC could run for nothing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* test/test_cmath.rb: Adding parens to suppress warnings.gogotanaka
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* file.c (rb_stat_ino): get inode from the interval of struct st.naruse
* win32/win32.c (stati64_set_inode): get nFilIndexHigh/Low, and set it to the interval of struct st as inode. * win32/win32.c (stati64_set_inode_handle): call stati64_set_inode. * win32/win32.c (rb_w32_fstati64): call stati64_set_inode_handle. * win32/win32.c (stati64_handle): call stati64_set_inode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13sleep thread until assertionsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13suppress warning: ambiguous first argument; put parentheses or a space even ↵naruse
after `/' operator git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* vm_core.h (rb_thread_t): add th->name.naruse
* vm.c (th_init): initialize th->name. * thread.c (Init_Thread): add Thread.name and Thread.name=. * thread.c (rb_thread_inspect): show thread's name if set. * thread.c (rb_thread_getname): defined. * thread.c (rb_thread_setname): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13envutil.rb: failure descriptionnobu
* test/lib/envutil.rb (assert_no_memory_leak): show detail failure description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12* lib/prime.rb: Return sized enumerators.marcandre
Patch by Kenichi Kamiya [GH-931] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12* lib/prime.rb: Fix with_object with no block givenmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12* lib/prime.rb: Have with_index accept an offset parameter.marcandre
Based on patch by T Yamada. [#11007] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12fix errorkazu
* test/ruby/test_extlibs.rb (TestExtLibs::check_existence): fix error. [Bug #11255] [ruby-dev:49079] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12vm.c: break from orphan blocknobu
* vm.c (rb_vm_search_cf_from_ep): break from orphan block is possible condition, but not [BUG]. [ruby-core:69548] [Bug #11254] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12* pack.c (pack_{un,}pack): new template character `j` and `J`, pointerusa
with signed and unsigned integers. * NEWS: mention bout this featre. [Feature #11215] [ruby-dev:49015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12* file.c (File::SHARE_DELETE): new flag to be able to delete opened fileusa
on Windows. * include/win32/win32.c (O_SHARE_DELETE): new pseudo file mode flag. * win32/win32.c (rb_w32_{w,}open): support above flag. [EXPERIMENTAL] * NEWS: mention about this feature. [Feature #11218] [ruby-dev:49022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12hash.c: fetch_valuesnobu
* hash.c (rb_hash_fetch_values): add `Hash#fetch_values`. [Feature #10017] [Fix GH-776] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12test_nofree.rb: fix commit missnobu
* test/-ext-/string/test_nofree.rb (test_no_memory_leak): remove limit and make the interation longer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12test_nofree.rb: rehearsalnobu
* test/-ext-/string/test_nofree.rb (test_no_memory_leak): add a rehearsal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12array.c: bsearch_indexnobu
* array.c (rb_ary_bsearch_index): Implement Array#bsearch_index method, which is similar to bsearch and returns the index or nil. [Feature #10730] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-11* lib/rubygems.rb: bump version to 2.4.7 and 2.4.8. these versions fixedhsbt
CVE-2015-3900. * lib/rubygems/remote_fetcher.rb: ditto. * test/rubygems/test_gem_remote_fetcher.rb: added testcase for CVE-2015-3900 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-11array.c: fix array size overflownobu
* array.c (ary_ensure_room_for_push): check if array size will exceed maxmum size to get rid of buffer overflow. [ruby-dev:49043] [Bug #11235] * array.c (ary_ensure_room_for_unshift, rb_ary_splice): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-11* test/test_cmath.rb (TestCMath#test_trigonometric_functions): shouldusa
not compare float values (in complex values) by `==`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-10* test/test_cmath.rb: Add assertions for trigonometric functions.gogotanaka
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-10* test/test_cmath.rb: Add assertions for error handling.gogotanaka
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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