summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-06-19test_last_thread.rb: relaxnobu
* test/-ext-/gvl/test_last_thread.rb (test_last_thread): allow low resolution sleep. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-19test_method.rb: fix commit missnobu
* test/ruby/test_method.rb (test_define_singleton_method_no_proc): fix missing object. [Bug #11283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-19test_gem_remote_fetcher.rb: get rid of errorsnobu
* test/rubygems/test_gem_remote_fetcher.rb (start_ssl_server): temporary measure for "dh key too small" error of OpenSSL 1.0.2c+. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-19proc.c: ArgumentError if no blocknobu
* proc.c (rb_mod_define_method): now requires a block direct to this method call. [ruby-core:69655] [Bug #11283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-19test_method.rb: split testnobu
* test/ruby/test_method.rb (test_define_singleton_method): split and fix test names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-19proc.c: inadvertent IDnobu
* proc.c (rb_mod_define_method): get rid of inadvertent ID creations at error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18* include/ruby/ruby.h: $SAFE=2 is now obsolete.hsbt
* dir.c, ext/fiddle/handle.c, ext/socket/basicsocket.c, file.c gc.c, io.c, process.c, safe.c, signal.c, win32/file.c: removed code for $SAFE=2 * test/erb/test_erb.rb, test/fiddle/test_handle.rb test/ruby/test_env.rb: removed tests for $SAFE=2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18test/socket/test_unix.rb: replace sleep with selectnormal
Not sure what drugs I was on, but blindly sleeping instead of using IO#wait or IO.select to wait for data on a socket is completely wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18error.c: NameError#receivernobu
* error.c (name_err_receiver): add NameError#receiver method. [Feature #10881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-17* include/ruby/ruby.h: $SAFE=3 is now obsolete.hsbt
* ext/socket/init.c, ext/socket/socket.c, ext/socket/tcpsocket.c ext/socket/udpsocket.c, gc.c, object.c, re.c, safe.c: removed code for $SAFE=3 * bootstraptest/test_method.rb, test/erb/test_erb.rb, test/ruby/test_dir.rb test/ruby/test_file.rb, test/ruby/test_method.rb, test/ruby/test_regexp.rb test/ruby/test_thread.rb: remove tests for $SAFE=3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-17* lib/csv.rb: accept to use Range object for row selection.hsbt
[Feature #11267][ruby-dev:49091] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-17servlet.rb: requires jsonnobu
* lib/rdoc/servlet.rb (documentation_search, root_search): requires json for JSON.dump and fix sporadic failures due to the loading order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-16test_nonblock.rb: use assert_predicatenobu
* test/socket/test_nonblock.rb (test_recv_nonblock_no_exception), (test_recvfrom_nonblock_no_exception): use assert_predicate for failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-16test_nonblock.rb: fix failure on OSXnobu
* test/socket/test_nonblock.rb (test_recvfrom_nonblock_no_exception): no destination to already connected socket. fix failure on OSX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-16* test/objspace/test_objspace.rb: relax pattern because uncollectibleko1
flag and marked flag can be false at major GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-15socket: allow explicit buffer for recv and recv_nonblocknormal
This reduces GC overhead and makes the API more consistent with IO#read and IO#read_nonblock. * ext/socket/basicsocket.c (bsock_recv): document outbuf * ext/socket/unixsocket.c (unix_recvfrom): ditto * ext/socket/init.c (rsock_strbuf, recvfrom_locktmp): new functions (rsock_s_recvfrom): support destination buffer as 3rd arg (rsock_s_recvfrom_nonblock): ditto * string.c (rb_str_locktmp_ensure): export for internal ext * test/socket/test_nonblock.rb: test recv_nonblock * test/socket/test_unix.rb: test recv [ruby-core:69543] [Feature #11242] Benchmark results: user system total real alloc 0.130000 0.280000 0.410000 ( 0.420656) extbuf 0.100000 0.220000 0.320000 ( 0.318708) -------------------8<-------------------- require 'socket' require 'benchmark' nr = 100000 msg = ' ' * 16384 size = msg.bytesize buf = ' ' * size UNIXSocket.pair(:DGRAM) do |a, b| Benchmark.bmbm do |x| x.report('alloc') do nr.times do b.send(msg, 0) a.recv(size, 0) end end x.report('extbuf') do nr.times do b.send(msg, 0) a.recv(size, 0, buf) end end end end git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-15socket: allow exception-free nonblocking sendmsg/recvmsgnormal
As documented before, exceptions are expensive and IO::Wait*able are too common in socket applications to be the exceptional case. Datagram sockets deserve the same API which stream sockets are allowed with read_nonblock and write_nonblock. Note: this does not offer a performance advantage under optimal conditions when both ends are equally matched in speed, but it it does make debug output cleaner by avoiding exceptions whenever the receiver slows down. * ext/socket/ancdata.c (bsock_sendmsg_internal, bsock_recvmsg_internal): support "exception: false" kwarg * ext/socket/init.c (rsock_s_recvfrom_nonblock): ditto * ext/socket/init.c (rsock_s_recvfrom_nonblock): use rsock_opt_false_p * ext/socket/socket.c (sock_connect_nonblock): ditto * ext/socket/rubysocket.h (rsock_opt_false_p): new function * ext/socket/basicsocket.c (bsock_recv_nonblock): update rdoc * ext/socket/udpsocket.c (udp_recvfrom_nonblock): ditto * test/socket/test_nonblock.rb: new tests [ruby-core:69542] [Feature #11229] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-15* lib/set.rb: Make Set#each and SortedSet#each generate a sizedknu
enumerator. [GH-931] by kachick (Kenichi Kamiya) * test/test_set.rb: Import tests from Set into SortedSet. [GH-931] by kachick (Kenichi Kamiya) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-15envutil.rb: show failure descriptionnobu
* test/lib/envutil.rb (assert_separately): always show failure description. signals are not available on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-15envutil.rb: no signal description iff possiblenobu
* test/lib/envutil.rb (FailDesc): show signal description only if it is available, or nothing if not killed by a signal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14test_require.rb: wait loadignobu
* test/ruby/test_require.rb (test_loading_fifo_threading): wait until the main thread blocks by loading. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14* thread.c (thread_start_func_2): don't interrupt when last thread exitkosaki
unless main thread is already exited. Otherwise main thread could be wrongly interrupted when it uses rb_thread_call_without_gvl(). Patch by Takehiro Kubo. [Bug #11237][ruby-dev:49044][GH-898] * test/-ext-/gvl/test_last_thread.rb: new test for the above fix. * ext/-test-/gvl/call_without_gvl/call_without_gvl.c: new ext for the above test. * ext/-test-/gvl/call_without_gvl/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14* ext/pathname/lib/pathname.rb (descend): Blockless form supported.akr
(ascend): Ditto. [ruby-core:68820] [Feature #11052] Patch by Piotr Szotkowski. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14* test/ruby/test_require.rb (TestRequire#test_loading_fifo_threading): omit onusa
Windows. the platform does not support fifo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14test_prime.rb: descriptive assertionsnobu
* test/test_prime.rb: use more descriptive assertions for better failure meessages, instead of simple assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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