summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2016-12-06EPERM by symlinknobu
* test/ruby/test_file.rb (test_realpath_encoding): EPERM can raise on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06EPERM by symlinknobu
* test/ruby/test_file_exhaustive.rb (symlinkfile): EPERM can raise on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06re.c: check that MatchData is initializedrhe
Follow r16757 ("* re.c: fix SEGV by Regexp.allocate.names, Match.allocate.names, etc.", 2008-06-02). Don't do null dereference if MatchData#hash or #== is called against an uninitialized instance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06test/ruby/test_hash.rb: suppress syntax warningrhe
Avoid "ambiguous first argument; put parentheses or a space even after `-' operator" warning in assert_in_out_err. Fixes r56992. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06switching hash removalnobu
* st.h (struct st_hash_type): Remove strong_hash. (struct st_table): Remove inside_rebuild_p and curr_hash. * st.c (do_hash): Use type->hash instead of curr_hash. (make_tab_empty): Remove setting up curr_hash. (st_init_table_with_size): Remove setting up inside_rebuild_p. (rebuild_table): Remove clearing inside_rebuild_p. (reset_entry_hashes, HIT_THRESHOULD_FOR_STRONG_HASH): Remove code recognizing a denial attack and switching to strong hash. * hash.c (rb_dbl_long_hash, rb_objid_hash, rb_ident_hash): Use rb_hash_start to randomize the hash. (str_seed): Remove. (any_hash): Remove strong_p and use always rb_str_hash for strings. (any_hash_weak, rb_any_hash_weak): Remove. (st_hash_type objhash): Remove rb_any_hash_weak. based on the patch by Vladimir N Makarov <vmakarov@redhat.com> at [ruby-core:78490]. [Bug #13002] * test/ruby/test_hash.rb (test_wrapper): objects other than special constants should be able to be wrapped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-05Remove closed checks and use `&.`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-05Don't insert an entry to loading_tbl if another thread succeed to load.shugo
If rb_thread_shield_wait() returns Qfalse, the file has been successfully loaded by another thread, so there is no need to insert a new entry into loading_tbl. [ruby-core:78464] [Bug #12999] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-05random.c: private randnobu
* random.c (rb_random_ulong_limited): do not call private method rand. [ruby-dev:49892] [Misc #13003] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-04Increase timeout of TestRequire#test_require_with_loaded_features_popnaruse
unstable10s fails it because of timeout http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161201T161908Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-04class.c: missing unknown_keyword_errornobu
* class.c (rb_get_kwargs): when values are stored, corresponding keys have been remove from the keyword hash, and the hash should be empty in that case. [ruby-dev:49893] [Bug #13004] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-04Specify the socktype explicitly.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-04Use 127.0.0.1 if getaddrinfo fails.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-03Use IPv6 if it's preferred.shugo
I hope this fix makes tests faster on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-03string.c: chomp optionnobu
* string.c (rb_str_enumerate_lines): implement chomp option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-03stringio: chomp optionnobu
* ext/stringio/stringio.c (strio_getline): implement chomp option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-03test_stringio.rb: paragraph modenobu
* test/stringio/test_stringio.rb (test_gets, test_each): assertions for paragraph mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-03add tests againts regressions for upcoming codepoint reordering in unfolding ↵duerst
table * test/ruby/enc/test_case_mapping.rb: Add method test_reorder_unfold to test against problems when reordering codepoints in some entries in CaseUnfold_11_Type CaseUnfold_11_Table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-03change test class name because it is not only about foldingduerst
* test/ruby/enc/test_case_comprehensive.rb: Change test class name from TestComprehensiveCaseFold to TestComprehensiveCaseMapping because the tests are about mapping in general, not only folding git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-02test/ruby/test_string.rb: ensure restoring $/nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-02parse.y: relax spacesnobu
* parse.y (parser_tokadd_utf8): relax restriction spaces inside "\u{...}". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-01String#unpack1 [Feature #12752]naruse
Returns the first value of String#unpack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-01Remove `offset:` from `Array#pack`usa
* pack.c (pack_pack): can use `@` instead of `offset:`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-01Supports `buffer` and `offset` in `Array#pack`usa
* pack.c (pack_pack): Supports `buffer` and `offset` in `Array#pack`. [Feature #12754] [ruby-dev:49798] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-01parse.y: reject invalid codepointnobu
* parse.y (parser_tokadd_codepoint): reject invalid codepoint, surrogate blocks and surrogate pair, as well as mruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-01Wait until excpetion handling is ready.shugo
Because RubyCI on Solaris 10 failed as follows: 1) Failure: TestProcess#test_execopts_redirect_open_fifo_interrupt_raise [/export/home/rubyci/unstable10s/tmp/build/20161130T201909Z/ruby/test/ruby/test_process.rb:646]: <"ok\n"> expected but was <"">. The argument of sleep (0.5) can be smaller, but I'm not sure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-01openssl: import fixes from upstreamrhe
Import the following two commits from upstream: commit 72126d6c8b88abd69c3565fc3bbbd5ed1e401611 Author: Kazuki Yamaguchi <k@rhe.jp> Date: Thu Dec 1 22:27:03 2016 +0900 pkey: check existence of EVP_PKEY_get0() EVP_PKEY_get0() did not exist in early OpenSSL 0.9.8 series. So define ourselves if needed. commit 94a1c4e0c5705ad1e9a4ca08cacaa6cba8b1e6f5 Author: Kazuki Yamaguchi <k@rhe.jp> Date: Thu Dec 1 22:13:22 2016 +0900 test/test_cipher: fix test with OpenSSL 1.0.1 before 1.0.1d Set the authentication tag before the AAD when decrypting. Before OpenSSL commit 96f7fafa2431 ("Don't require tag before ciphertext in AESGCM mode", 2012-10-16, at OpenSSL_1_0_1-stable branch, included in OpenSSL 1.0.1d), the authentication tag must be set before any calls of EVP_CipherUpdate(). They should fix build on CentOS 5 and Ubuntu 12.04 respectively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30Regexp supports Unicoe 9.0.0's \Xnaruse
* meta character \X matches Unicode 9.0.0 characters with some workarounds for UTR #51 Unicode Emoji, Version 4.0 emoji zwj sequences. [Feature #12831] [ruby-core:77586] The term "character" can have many meanings bytes, codepoints, combined characters, and so on. "grapheme cluster" is highest one of such words, which means user-perceived characters. Unicode Standard Annex #29 UNICODE TEXT SEGMENTATION specifies how to handle grapheme clusters (extended grapheme cluster). But some specs aren't updated to current situation because Unicode Emoji is rapidly extended without well definition. It breaks the precondition of UTR#29 "Grapheme cluster boundaries can be easily tested by looking at immediately adjacent characters". (the sentence will be removed in the next version) Though some of its detail are described in Unicode Technical Report #51 UNICODE EMOJI but it is not merged into UTR#29 yet. http://unicode.org/reports/tr29/ http://unicode.org/reports/tr51/ http://unicode.org/Public/emoji/4.0/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30parse.y: refine error messagenobu
* parse.y (parser_tokadd_utf8): refine error message at bad char in unicode escape, "invalid" instead of "unterminated". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30openssl: import v2.0.0rhe
Import Ruby/OpenSSL 2.0.0. The full commit history since 2.0.0 beta.2 (imported at r56098) can be found at: https://github.com/ruby/openssl/compare/v2.0.0.beta.2...v2.0.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30fix uppercasing for U+A64B, CYRILLIC SMALL LETTER MONOGRAPH UKduerst
* enc/unicode.c: Add U+A64B to the special cases 03B9 and 03BC at the end of onigenc_unicode_case_map (Bug #12990). * enc/unicode/case-folding.rb: Add U+A64B to the special cases 03B9 and 03BC. Add a comment pointing to enc/unicode.c. Change warnings to exceptions for unpredicted cases, because this would have been more easily noticed (the warning was not noticed when upgrading to Unicode 9.0.0). * test/ruby/enc/test_case_comprehensive.rb: Remove temporary exclusion of U+A64B from testing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30Supress warnings.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29get rid of ambiguous parentheses warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29webrick: don't use OpenSSL::TestUtils from webrick testsrhe
Follow net/http and open-uri. Don't rely on the constants/methods from OpenSSL::TestUtils. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29open-uri: don't use OpenSSL::TestUtils from open-uri testsrhe
Follow net/http. Define own test DH parameters and use. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29net/http: don't use OpenSSL::TestUtils from test coderhe
Make test code independent of test/openssl/utils.rb. The development of openssl library has moved to a separate repository and OpenSSL::TestUtils may be modified at any time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29object.c: no TypeError at special constnobu
* object.c (special_object_p): no longer raise a TypeError for Integer and Float, and return itself instead. [Feature#12979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29object.c: no TypeError at special const clonenobu
* object.c (rb_obj_clone2): no longer raise a TypeError for special constants, and return itself instead. however, if freeze option is false, raise an ArgumentError. [Feature#12979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29Suppress warnings.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29Fix erroneous test of target against targetduerst
* test/ruby/enc/test_case_comprehensive.rb: fix test condition, add a temporary check for U+A64B, the only character where the tests currently fail. (Bug #12990) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29Ignore SystemCallError in case it is raised by SSLSocket#accept.shugo
Errno::ECONNRESET was raised by test_tls_post_connection_check and test_tls_unknown_ca on mswin64 CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29test_keyword.rb: more assertionsnobu
* test/ruby/test_keyword.rb (test_block_required_keyword): more assertions for positional and require keyword parameters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29test_keyword.rb: assert_raise_with_message valuenobu
* test/ruby/test_keyword.rb (test_block_required_keyword): assert_raise_with_message returns the raised exception object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29net/ftp: add a new option ssl_handshake_timeout to Net::FTP.new.shugo
The TLS handshake timeout can be specified independently, because the TLS handshake doesn't start just after the underlying connection is established, but after the AUTH command is completed. It's also useful for testing purposes. However, if ssl_handshake_timeout is not specified, open_timeout is used instead for convenience. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28hide exceptions in server threadusa
* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): sleeping to give a chance of complete of accept is a timing issue at all. therefore, simply ignore the exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28implement String/Symbol#casecmp? including Unicode case foldingduerst
* string.c: Implement String#casecmp? and Symbol#casecmp? by using String#downcase :fold for Unicode case folding. This does not include options such as :turkic, because these currently cannot be combined with the :fold option. This implements feature #12786. * test/ruby/test_string.rb/test_symbol.rb: Tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-28Give a chance to complete server.acceptusa
* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): get rid of a test error on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-27object.c: no TypeError at special const dupnobu
* object.c (rb_obj_dup): no longer raise a TypeError for special constants, and return itself instead. [Feature#12979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26file.c: home directory from systemnobu
* file.c (rb_default_home_dir): resolve home directory from the system database when HOME is not set. [Feature #12695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26net/ftp: support timeout for TLS handshake.shugo
Net::FTP inherits ssl_socket_connect from Net::Protocol to implement timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-25round-downnobu
* numeric.c (round_half_down, int_round_half_down): support round-down mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e