summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-05-06share `@@accept_charset`nobu
* lib/cgi/{core,util}.rb: include CGI::Util not only extending, to share `@@accept_charset` class variable, so that it is always accessible. [ruby-core:80986] [Bug #13539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-04parse.y: make shared string modifiablenobu
* parse.y (dedent_string): ensure that the string is modifiable, not to set the length of shared string. [ruby-core:80987] [Bug #13540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03rss: Accept empty text element as valid elementkou
Parser has been accepted it but XML serializer wasn't accepted. Reported by stefano frabetti. Thanks!!! [ruby-core:80965] [Bug #13531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02ripper/lexer.rb: nested indented heredocnobu
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for nested indedented here documents, where `Elem`s are nested too. [ruby-core:80977] [Bug #13536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01Merge rubygems-2.6.12 from rubygems/rubygems.hsbt
* Details of changes: https://github.com/rubygems/rubygems/blob/009080040279282d7b8ddd09acab41719cb4ba00/History.txt#L3 * I kept ko1's commmit related thread issue. It's not merged 2.6 branch on rubygems. https://github.com/ruby/ruby/commit/1721dfa0ea963a85d4ac1e3415eb18ef427d4d36 * I removed test_realworld_default_gem from rubygems-2.6.12. It fails on Ruby trunk. Because it's differences of test suite and environment. https://github.com/rubygems/rubygems/pull/1899 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01object.c: Kernel#yield_selfnobu
* object.c (rb_obj_yield_self): new method which yields the receiver and returns the result. [ruby-core:46320] [Feature #6721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01zlib.c: no buf_filled in zstreamnobu
* ext/zlib/zlib.c (zstream): manage capacity and size of `buf` instead of size and separated member `buf_filled`. reported by Christian Jalio (jalio) at https://hackerone.com/reports/211958 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-29node.h: sign-extendnobu
* node.h (nd_line): should sign-extend. shifting `VALUE` extends with zero bits if `sizeof(VALUE)` equals to `sizeof(int)`. the zero bits are truncated if `sizeof(VALUE)` is bigger enough. [ruby-core:80920] [Bug #13523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28parse.y: fix line in rescuenobu
* parse.y (set_line_body, primary): fix line number of bodystmt as the beginning of the block. [ruby-core:79388] [Bug #13181] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27Send the backtrace of the circular require warning as a single String to ↵eregon
Warning.warn * load.c: send as a single string. * error.c: expose the string formatted by rb_warning as rb_warning_string(). * test/ruby/test_exception.rb: update tests. [ruby-core:80850] [Bug #13505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27refactor newhash (revision 58463 another try) [fix GH-1600]shyouhei
* st.c (rb_hash_bulk_insert): new API to bulk insert entries into a hash. Given arguments are first inserted into the table at once, then reindexed. This is faster than inserting things using rb_hash_aset() one by one. This arrangement (rb_ prefixed function placed in st.c) is unavoidable because it both touches table internal and write barrier at once. * internal.h: delcare the new function. * hash.c (rb_hash_s_create): use the new function. * vm.c (core_hash_merge): ditto. * insns.def (newhash): ditto. * test/ruby/test_hash.rb: more coverage on hash creation. * test/ruby/test_literal.rb: ditto. ----------------------------------------------------------- benchmark results: minimum results in each 7 measurements. Execution time (sec) name before after loop_whileloop2 0.136 0.137 vm2_bighash* 1.249 0.623 Speedup ratio: compare with the result of `before' (greater is better) name after loop_whileloop2 0.996 vm2_bighash* 2.004 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26error.c: send as a single stringnobu
* error.c (rb_warn_m): send the arguments as a single string concatenated with a newline, so it can be filtered easily. [ruby-core:80875] [Feature #12944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25suppress_warningnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25add timeout.ko1
* test/ruby/test_trace.rb (test_trace_stackoverflow): sometimes this test was stopped forever and killed by test process forcibly. However, this test only checks if this code cause some critical failure such as SEGV. So that we can add timeout for this code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25no longer rescue exceptions of #<=> when initializing a Rangeeregon
* range.c (range_init): no longer hide the user exception with a ArgumentError, just let the user exception go through. * test/ruby/test_range.rb (test_new): add tests. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25no longer rescue exceptions of #coerce in Integer#steperegon
* numeric.c (num_step_negative_p): no more error hiding. * test/ruby/test_float.rb, test/ruby/test_numeric.rb: follow the change. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25no longer rescue exceptions in numeric comparison operationseregon
* numeric.c (do_coerce): no more error hiding. * test/ruby/test_numeric.rb: follow the change. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Import gemspechsbt
Import gemspec and test file from ruby/webrick. * webrick.gemspec: Update files and dependency for standalone gem. * test/webrick/utils.rb: Added explicitly loading of EnvUtil for test suite without ruby core test suite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25load.c: backtrace of circular requirenobu
* load.c (load_lock): print backtrace of circular require via `Warning.warn` [ruby-core:80850] [Bug #13505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Import gemspec and test file changes from ruby/gdbm.hsbt
* gdbm.gemspec: Update basic configuraiton for standalone gdbm gem. * test/gdbm/test_gdbm.rb: In standalone environment, It needs to explicit loading of EnvUtil module for test suite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24parse.y: args tail at errornobu
* parse.y (new_args_tail_gen): abandon parsing arguments after error. reported by ilsani Martino Sani (ilsani) at https://hackerone.com/reports/221201 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Allow Net::HTTP to fetch user/pass from http_proxynaruse
Note that this feature is enabled only on environment variables are multi-user safe. In this time the list includes Linux, FreeBSD, or Darwin. [Bug #12921] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Add diagnostic reports section header [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23assert_syntax_error returns the exception [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Fix space flag when Inf/NaN and width==3nobu
* sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in `" Inf"` and `" Inf"` respectively, `"% 3f"` results in `"Inf"` (no space). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22test/test_prime.rb: update method name in commentstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22test_file_exhaustive.rb: check case-sensitive fsnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path): dump expanded file name, not only appended char, for case-sensitive filesystem. [ruby-dev:50093] [Bug #13489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22define PACKED_STRUCT_UNALIGNED correctlynormal
Defining PACKED_STRUCT_UNALIGNED to a noop in ruby/config.h (via `configure') prevents the definition in include/ruby/defines.h from working This should have been fixed in r46914, so there's a size regression for some objects since Ruby 2.2+. I do not believe we can backport to existing releases, either, since it can affect ABI. Add a test for Time objects on common x86-based platforms to check for future regressions. * configure.in: remove PACKED_STRUCT_UNALIGNED definition * test/ruby/test_time.rb (test_memsize): new test for x86 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21test/socket/test_basicsocket: handle :wait_readable on read_nonblocknormal
On some systems with slower local sockets, :wait_readable may happen and we should wait on it to drain the socket. This is a possible fix for https://bugs.ruby-lang.org/issues/13491 * test/socket/test_basicsocket.rb (test_read_write_nonblock): handle :wait_readable on read_nonblock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21Removed mathn.rb from stdlib. It's deprecated from Ruby 2.2.hsbt
[Feature #10169][[ruby-core:64553]] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21test_framework.rb: for case-sensitive filesystemnobu
* test/mkmf/test_framework.rb (test_single_framework): fix header file name for case-sensitive filesystem. it may not be same as the framework name, but should be the actual file name. [ruby-dev:50093] [Bug #13489] * test/mkmf/test_framework.rb (test_multi_frameworks): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20use correct synchronization.ko1
* test/ruby/test_thread.rb (make_handle_interrupt_test_thread1): use Queue to use correct synchronization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20ruby-lex.rb: fix continued line conditionsnobu
* lib/irb/ruby-lex.rb (RubyLex#lex): fix conditions for continued line; empty lines, a semicolon, first line in `begin` block, just after `else` are not continued. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20Removed deprecated extensions of mathn.hsbt
* ext/mathn/{complex,rational}: Removed from ruby core. [fix GH-1542][Feature #13334][ruby-core:80247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20Move test_extlibs.rb because it's not the test of ruby itselfusa
* test/test_extlibs.rb: moved from test/ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19socket: avoid fcntl for read/write_nonblock on Linuxnormal
On platforms where MSG_DONTWAIT works reliably on all sockets (so far, I know of Linux), we can avoid fcntl syscalls and implement IO#write_nonblock and IO#read_nonblock in terms of the socket-specific send and recv family of syscalls. This avoids side effects on the socket, and also encourages generic code to be written in cases where IO wrappers like OpenSSL::SSL::SSLSocket are used. Perhaps in the future, side-effect-free non-blocking I/O can be standard on all files and OSes: https://cr.yp.to/unix/nonblock.html * ext/socket/lib/socket.rb (read_nonblock, write_nonblock): Linux-specific wrapper without side effects [ruby-core:80780] [Feature #13362] * test/socket/test_basicsocket.rb (test_read_write_nonblock): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18compile.c: wrong optimizationnobu
* compile.c (compile_branch_condition): expression which has side effects should not be eliminated. [ruby-core:80740] [Bug #13444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18test_optimization.rb: heredoc code stylenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17should not return.ko1
* test/ruby/test_settracefunc.rb (test_throwing_return_with_finish_frame): should not use `return`, but should use `next`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17eval.c: copy before cause setupnobu
* eval.c (setup_exception): copy frozen exception before setting up a cause not only a backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16test_integer.rb: simplify teststomar
* test/ruby/test_integer.rb: simplify test for Integer.sqrt. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16test/ruby/test_io.rb: use Thread.stop? to waitnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16* test/ruby/test_io.rb (test_race_closed_stream): separate because it stopsusa
entire test process on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15bignum.c: fix inexact estimationnobu
* bignum.c (estimate_initial_sqrt): estimated square root is inexact if it is not equal to its ceil, needs Newton's method. [ruby-core:80696] [Bug #13440] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15fix RSTRUCT_LEN macro in public C APInormal
rb_struct_size returns an Integer VALUE, so it must be converted to a `long` for compatibility with previous Ruby C API versions. * ext/-test-/struct/len.c: new * test/-ext-/struct/test_len.rb: new * include/ruby/ruby.h (RSTRUCT_LEN): use NUM2LONG [ruby-core:80692] [Bug #13439] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14sync certainly.ko1
* test/ruby/test_io.rb (test_race_closed_stream): awit for 'sleep' state. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14more explicit synchronization.ko1
* test/ruby/test_io.rb (test_race_closed_stream): wait for blocking by r.gets. On some systems (for example, high load average systems) can't start Thread correctly and can't wait r.gets in invoked Thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14IPSocket#inspectnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14increase timeout seconds.ko1
* test/ruby/test_trace.rb (test_trace_stackoverflow): on some platforms this test fails because of timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e