summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-11-27Merge psych-3.0.0.beta4 from upstream.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27Ignore failures related to threading.ko1
* test/lib/tracepointchecker.rb: ignore "deletion trace" check when there are threads other than the main thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26openssl: sync with 2475d94517b4rhe
Merge a commit from upstream: 01445af367ec test/test_ssl: prevent changing default internal encoding OpenSSL::TestSSL#test_fallback_scsv could change the default internal encoding accidentally, causing other unrelated test cases to fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-26leakchecker.rb: no conversionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-25openssl: import v2.1.0.beta2rhe
Import Ruby/OpenSSL 2.1.0.beta2. The full commit log since commit e72d960db262 which was imported by r60013 can be found at: https://github.com/ruby/openssl/compare/e72d960db262...v2.1.0.beta2 ---------------------------------------------------------------- Kazuki Yamaguchi (26): bn: use ALLOCV() macro instead of xmalloc() appveyor.yml: remove 'openssl version' line test/test_ssl_session: skip tests for session_remove_cb x509ext: implement X509::Extension#== x509attr: implement X509::Attribute#== x509cert: implement X509::Certificate#== x509revoked: add missing X509::Revoked#to_der x509crl, x509revoked: implement X509::{CRL,Revoked}#== x509req: implement X509::Request#== ssl: extract rb_intern("call") cipher: disallow setting AAD for non-AEAD ciphers test/test_cipher: fix test_non_aead_cipher_set_auth_data failure ssl: fix conflict of options in SSLContext#set_params buffering: let #write accept multiple arguments pkey: make pkey_check_public_key() non-static x509cert, x509crl, x509req, ns_spki: check sanity of public key test/envutil: port assert_warning from Ruby trunk test/utils: remove a pointless .public_key call in issue_cert ssl: add SSLContext#add_certificate test/test_ssl: fix test_security_level Drop support for LibreSSL 2.4 kdf: add HKDF support test/test_x509cert: fix flaky test test/test_x509crl: fix random failure History.md: fix a typo Ruby/OpenSSL 2.1.0.beta2 Mark Wright (1): Fix build failure against OpenSSL 1.1 built with no-deprecated Thanks rhenium for the code review and fixes. Peter Karman (1): Add RSA sign_pss() and verify_pss() methods aeris (1): TLS Fallback Signaling Cipher Suite Value kazu (1): Use caller with length to reduce unused strings git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-25openssl: revert changes in SSLContext#{min,max}_version= in r60310rhe
And adapt a net/http test to their old behavior. [ruby-core:83491] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24test_workspace.rb: skip test failing on windowsk0kubun
> Note that all files are always readable > https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/chmod-wchmod It seems that we can't make a file unreadable with `File.chmod` on Windows. When file can't be read, File::EACCES is raised on Windows too. So r60900 should work anyway, but I don't know how to let it happen by Ruby code. I tried to open file before reading it, but I couldn't reproduce File::EACCES too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24Fix TOCTTOU and avoid to read existing unreadable filekazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24Fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24test/irb/test_workspace.rb: fix SCRIPT_LINES__nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24parse.y: refactor list literalsnobu
* parse.y (words, symbols, qwords, qsymbols): unify empty list and non-empty list. * parse.y (parser_parse_string): always dispatch a word separator at the beginning of list literals. [ruby-core:83871] [Bug #14126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24test_parser_events.rb: results of list literalsnobu
* test/ripper/test_parser_events.rb (test_qwords_add), (test_qsymbols_add, test_symbols_add, test_words_add): more assertions for results of list literals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24irb.rb: show source around binding.irb on startk0kubun
[Feature #14124] [ruby-dev:50319] [close GH-1764] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23io.c: read BOM only for readingnobu
* io.c (io_strip_bom): just abandon detecting UTF encoding by BOM unless opened for reading. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23ripper.y: fix word list eventsnobu
* parse.y (parser_skip_words_sep): QWORDS_BEG should not include the first separators in ripper. * parse.y (parser_parse_string): WORDS_SEP should not include the closing parentheses of a word list in ripper, should include spaces at beginning of lines. [ruby-core:83864] [Bug #14126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21fix test_erb.rb [GH-1763]nobu
* test/erb/test_erb.rb (test_run): require stringio. suppress an unused variable warning. From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21test/ruby/bug-13526.rb: should wait until all threads are stoppederegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add hadamard_product/entrywise_product.marcandre
Based on a patch by Charley Hutchison. [GH-674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add Matrix{.|#}combinemarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: accept vectors in {h|v}stackmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add explicit coercion #to_matrixmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19test/ruby/bug-13526.rb: Fix to actually refer to an existing fileeregon
* Add Thread.report_on_exception=true to catch problems early. * Increase the number of Thread.pass to let the autoload start. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16parse.y: no return in classnobu
* parse.y (k_return): prohibit return in class/module body except for singleton class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16Add a last location to branch coverageyui-knk
* compile.c (DECL_BRANCH_BASE, ADD_TRACE_BRANCH_COVERAGE): Add a last location to arguments. * compile.c (compile_if, compile_case, compile_case2, compile_loop, iseq_compile_each0): Pass a last location to macros. * ext/coverage/coverage.c (branch_coverage): Add a last location to a return value. * test/coverage/test_coverage.rb: Follow-up these changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16cleanup hook cleanup code.ko1
* vm_trace.c: before this patch, deleted hooks are remvoed at *the beggining* of hooks (exec_hooks_precheck). This patch cleanup deleted hooks at (1) just after hook is deleted (TracePoint#disable and so on) (2) just after executing hooks (exec_hooks_postcheck) Most of time (1) is enough, but if some threads running hooks, we need to wait cleaning up deleted hooks until threads finish running the hooks. This is why (2) is introduced (and this is why current impl cleanup deleted hooks at the beggining of hooks). * test/lib/tracepointchecker.rb: check also the number of delete waiting hooks. * cont.c (cont_restore_thread): fix VM->trace_running count. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15remove rb_thread_t::event_hooks.ko1
* vm_core.h (rb_thread_t): remove rb_thread_t::event_hooks. * vm_trace.c: all hooks are connected to vm->event_hooks and add rb_event_hook_t::filter::th to filter invoke thread. It will simplify invoking hooks code. * thread.c (thread_start_func_2): clear thread specific trace_func. * test/ruby/test_settracefunc.rb: add a test for Thread#add_trace_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15fix uninitialized memory reference.ko1
* compile.c (iseq_set_sequence): clear kwargs (in ci_entries) memory area. kwargs ci entries are initialized by compiler. However, sometimes these initializations are skipped because corresponding calls are eliminated by some optimizations (for example, `if true` syntax elimnates else code). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14parse.y: zero codepointsnobu
* parse.y (parser_tokadd_utf8): relax restriction to allow zero or more codepoints. fixup r59417. https://github.com/ruby/ruby/commit/7e8b910#commitcomment-25602670 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14remove `trace` instruction. [Feature #14104]ko1
* tool/instruction.rb: create `trace_` prefix instructions. * compile.c (ADD_TRACE): do not add `trace` instructions but add TRACE link elements. TRACE elements will be unified with a next instruction as instruction information. * vm_trace.c (update_global_event_hook): modify all ISeqs when hooks are enabled. * iseq.c (rb_iseq_trace_set): added to toggle `trace_` instructions. * vm_insnhelper.c (vm_trace): added. This function is a body of `trace_` prefix instructions. * vm_insnhelper.h (JUMP): save PC to a control frame. * insns.def (trace): removed. * vm_exec.h (INSN_ENTRY_SIG): add debug output (disabled). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-13compile.c: fixup r60727nobu
* compile.c (iseq_peephole_optimize): skip next `freezestring` instruction after `concatstrings` instruction when frozen string literal is enabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-13regexec.c: invalidate previously matched positionnobu
* regexec.c (match_at): invalidate end position not yet matched when new start position is pushed, to dispose previously stored position. [ruby-core:83743] [Bug #14101] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-13test_regexp.rb: test_absentnobu
* test/ruby/test_regexp.rb (test_absent): add simple tests for absent operator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-13envutil.rb: preserve RUBYLIBnobu
* test/lib/envutil.rb (invoke_ruby): preserve RUBYLIB which is set by runruby.rb and necessary to load standard libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-12load.c: cwd encodingnobu
* load.c (rb_get_expanded_load_path): save cwd cache in OS path encoding, to get rid of unnecessary conversion and infinite loading when it needs encoding conversion. [ruby-dev:50221] [Bug #13863] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-10bin/erb: change template file encoding to UTF-8k0kubun
Unlike Ruby source file encoding (script encoding) whose default is changed to UTF-8 in Ruby 2.0 (Feature #6679), template's file encoding given to erb(1) has been ASCII-8BIT since ERB supports m17n at r21170. Like Ruby source file encoding, erb template file encoding should be UTF-8 in Ruby 2. [Bug #14095] [ruby-core:83708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-10Do not define test method instead of skip when Calendar class is not defined.hsbt
Revisit r34739. Patch by MSP-Greg. [Bug #14088][ruby-core:83690][fix GH-1743] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-09TracePoint.new: raise ArgumentError when no block given [#14074]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-09fix backtrace on argment error.ko1
* vm_backtrace.c (rb_backtrace_use_iseq_first_lineno_for_last_location): added. It modifies last location's line as corresponding iseq's first line number. * vm_args.c (raise_argument_error): use added function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-09fix peephole optimization.ko1
* compile.c (iseq_peephole_optimize): do not need to put `pop` instruction. * test/ruby/test_optimization.rb (test_peephole_optimization_without_trace): This code "def foo; 1.times{|(a), &b| nil && a}; end" fails to compile by stack underflow because of above bug (fixed by this patch). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07disable GC.ko1
* test/ruby/test_io.rb (test_write_no_garbage): malloc can cause GC and it will reduce string object counts. So disable GC during this test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05enum.c: check argument firstnobu
* enum.c (enum_cycle_size): check an argument before the size of the receiver, if it is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05test/ruby/test_lazy_enumerator.rb: test for [Bug #14082]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05Fix size on Enumerable#cycle when the size is 0 [Bug #14082].marcandre
Patch by Kenichi Kamiya git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05ext/win32ole/lib/win32ole.rb (metods): rescue WIN32OLEQueryInterfaceError.suke
test/win32ole/test_win32ole.rb: add test for WIN32OLE#methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05test/win32ole/test_win32ole_method.rb: remove redundant assertions.suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-04test/ruby/test_io.rb (test_write_no_garbage): Add detailed messagemame
I saw this test failed once. There is no problem if `before > after` but we cannot check it. To allow diagnosis in future, the detailed message is added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-04openssl: pull test case from upstream commit 62af0446569arhe
The test case added by r60310 ("fix OpenSSL::SSL::SSLContext#min_version doesn't work", 2017-10-21) does not pass with OpenSSL >= 1.1.0 or LibreSSL >= 2.6.0. Check that the default 'min_version' value is properly enforced by actually attempting a handshake rather than by inspecting the SSL option flags. [ruby-core:83479] [Bug #14039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-03test/ruby/test_eval.rb: use orphan procsnobu
This failure has been hidden by the bug of assert_raise which is fixed at r60614. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-02skip/fix wrong testsnobu
* test/ruby/test_{class,eval}.rb: skip or fix wrong tests hidden by a bug of assert_raise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-02assertions.rb: fix return in assert_raisenobu
* test/lib/test/unit/assertions.rb (assert_raise): should fail if returned gently in the given block without any exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e