summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2016-11-14merge revision(s) 56559,56582,56584,56585: [Backport #12903]nagachika
* test/ruby/test_file.rb (TestFile#test_stat): fix noatime case. [ruby-core:77943] [Bug #12903] * ext/-test/file/fs.c (get_atime_p): Updating of file access times is enabled or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05merge revision(s) 55074: [Backport #12868]nagachika
* ext/openssl/ossl.c (Init_openssl): register an ex_data index for X509_STORE and X509_STORE_CTX respectively. Since they don't share the ex_data index registry, we can't use the same index. (ossl_verify_cb): use the the correct index. * ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. (ossl_x509stctx_verify): ditto. * ext/openssl/ossl.h (void ossl_clear_error): add extern declarations of ossl_store_{ctx_,}ex_verify_cb_idx. * ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and X509_STORE_get_ex_data. * ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05merge revision(s) 56550:nagachika
* ext/bigdecimal/bigdecimal.c: Import changes from ruby/bigdecimal repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03merge revision(s) 56281,56282:nagachika
strscan.c: use S_RESTLEN * ext/strscan/strscan.c (strscan_getch, strscan_peek), (strscan_rest_size, inspect2): use S_RESTLEN consistently. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26merge revision(s) 55057:nagachika
* ext/openssl/ossl_pkcs12.c (ossl_pkcs12_initialize): pop errors leaked by PKCS12_parse(). This is a bug in OpenSSL, which exists in the versions before the version 1.0.0t, 1.0.1p, 1.0.2d. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29backport additional fix memory leak from openssl upstream.nagachika
https://github.com/ruby/openssl/commit/e76f076f093efb93dabf2cb042c527500f956061 patches are provided by rhe (Kazuki Yamaguchi). * ext/openssl/ossl_x509ext.c: additional fix memory leak. [ruby-core:76922] [Bug #12680] * text/openssl/test_x509ext.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26backport fix memory leak from upstream.nagachika
https://github.com/ruby/openssl/compare/3a2840e80d275895523a526ce56e4f6e7b8f9cc4...1e30cd395b14ef46e04bdd9ab72f10067890b265 patches are provided by rhe (Kazuki Yamaguchi). * ext/openssl/ossl_config.c: fix memory leak. [ruby-core:76922] [Bug #12680] * ext/openssl/ossl_ocsp.c: ditto. * ext/openssl/ossl_pkcs12.c: ditto. * ext/openssl/ossl_pkcs7.c: ditto. * ext/openssl/ossl_pkey_ec.c: ditto. * ext/openssl/ossl_x509.h: ditto. * ext/openssl/ossl_x509attr.c: ditto. * ext/openssl/ossl_x509crl.c: ditto. * ext/openssl/ossl_x509ext.c: ditto. * ext/openssl/ossl_x509req.c: ditto. * ext/openssl/ossl_x509revoked.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18merge revision(s) 55822: [Backport #12660]nagachika
* ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): avoid undefined behavior * test/openssl/test_pair.rb (test_write_zero): new test [ruby-core:76751] [Bug #12660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18merge revision(s) 55797: [Backport #12645]nagachika
* ext/socket/option.c, ext/socket/rubysocket.h (inet_ntop): share the fallback definition. [ruby-core:76646] [Bug #12645] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55523: [Backport #12524]nagachika
* ext/digest/md5/md5ossl.h: Remove excess semicolons. Suppress warning on Solaris with Oracle Solaris Studio 12. [ruby-dev:49692] [Bug #12524] * ext/digest/md5/md5cc.h: ditto. * ext/digest/sha1/sha1cc.h: ditto. * ext/digest/sha1/sha1ossl.h: ditto. * ext/digest/sha2/sha2cc.h: ditto. * ext/digest/sha2/sha2ossl.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15merge revision(s) 55410: [Backport #12488]nagachika
* ext/date/date_strftime.c (date_strftime_with_tmx): reject too large precision to get rid of buffer overflow. reported by Guido Vranken <guido AT guidovranken.nl>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15merge revision(s) 55047: [Backport #12441]nagachika
* ext/openssl/ossl_bn.c (try_convert_to_bnptr): Extracted from GetBNPtr(). This doesn't raise exception but returns NULL on error. (GetBNPtr): Raise TypeError if conversion fails. (ossl_bn_eq): Implement BN#==. (ossl_bn_eql): #eql? should not raise TypeError even if the argument is not compatible with BN. (ossl_bn_hash): Implement BN#hash. * ext/openssl/ossl_bn.c (Init_ossl_bn): Define #== and #hash. * test/openssl/test_bn.rb: Test BN#eql?, #== and #hash git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15merge revision(s) 55175: [Backport #12428]nagachika
* ext/openssl/ossl_pkey_dh.c (ossl_dh_compute_key): Check that the DH has 'p' (the prime) before calling DH_size(). We can create a DH with no parameter but DH_size() does not check and dereferences NULL. [ruby-core:75720] [Bug #12428] * ext/openssl/ossl_pkey_dsa.c (ossl_dsa_sign): Ditto. DSA_size() does not check dsa->q. * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_public_encrypt, ossl_rsa_public_decrypt, ossl_rsa_private_encrypt, ossl_rsa_private_decrypt): Ditto. RSA_size() does not check rsa->n. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15merge revision(s) 55497,55498,55504: [Backport #11988]nagachika
* ext/psych/*, test/psych/*: Upate psych 2.1.0 This version fixed [Bug #11988][ruby-core:72850] * ext/psych/*, test/psych/*: Update psych 2.1.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11merge revision(s) 55434: [Backport #12401]nagachika
* common.mk (build-ext), ext/extmk.rb: use variable EXTENCS different than ENCOBJS, to get rid of circular dependency. build libencs when linking encodings statically. [ruby-core:75618] [Bug #12401] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11merge revision(s) 55100: [Backport #12292]nagachika
* ext/openssl/ossl_ssl.c (ossl_ssl_stop): Don't free the SSL struct here. Since some methods such as SSLSocket#connect releases GVL, there is a chance of use after free if we free the SSL from another thread. SSLSocket#stop was documented as "prepares it for another connection" so this is a slightly incompatible change. However when this sentence was added (r30090, Add toplevel documentation for OpenSSL, 2010-12-06), it didn't actually. The current behavior is from r40304 (Correct shutdown behavior w.r.t GC., 2013-04-15). [ruby-core:74978] [Bug #12292] * ext/openssl/lib/openssl/ssl.rb (sysclose): Update doc. * test/openssl/test_ssl.rb: Test this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10merge revision(s) 55380: [Backport #12255]nagachika
* ext/json/lib/*.rb: Removed some comments. Because these are unnecessary class description. [ci skip][Bug #12255][ruby-core:74835] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-18merge revision(s) 55123,55129,55130,55133,55136: [Backport #12414]nagachika
* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): consider non-finite float values not to raise FloatDomainError. [ruby-core:75682] [Bug #12414] * ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not always exist. fixed build error on Windows introduced at r55123. * ext/bigdecimal/bigdecimal.c (isfinite): get rid of a warning on cygwin. [Bug #12417][ruby-core:75691] * include/ruby/missing.h (isfinite): move from numeric.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-13merge revision(s) 54721: [Backport #12311]nagachika
* ext/date/date_core.c (Init_date_core): [DOC] Convert DateTime documentation to RDoc from Markdown. [ruby-core:75136] [Bug #12311] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-05merge revision(s) 53322,53323: [Backport #11880]nagachika
* ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blank string conversion. [Bug #11880] Thanks Akio Tajima for the patch! string conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-25merge revision(s) 54755: [Backport #12313]nagachika
* encoding.c: Fix return value of `Encoding::ISO8859_1.name` [Bug #12313][ruby-core:75147][ci skip] * ext/bigdecimal/bigdecimal.c: Fix code sample of `BigDecimal.new` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-22merge revision(s) 54423,54489: [Backport #12201] [Backport #12202]nagachika
* ext/nkf/nkf-utf8/nkf.c: Merge upstream 4f3edf80a0. patched by Anton Sivakov [Bug #12201] [Bug #12202] * ext/nkf/nkf-utf8/nkf.c (mime_putc): fix typo. [Bug #12202] [ruby-core:74802] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18merge revision(s) 54611,54612: [Backport #12291]naruse
* struct.c (struct_make_members_list): extract making member name list from char* va_list, with creating symbols without intermediate IDs. * struct.c (struct_make_members_list, rb_struct_s_def): member names should be unique. [ruby-core:74971] [Bug #12291] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18merge revision(s) 54529: [Backport #12264]naruse
* ext/win32/lib/win32/registry.rb (DeleteValue, DeleteKey): fix API names. [ruby-core:74863] [Bug #12264] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18merge revision(s) 54484: [Backport #12095]naruse
* vm_core.h (rb_vm_struct): make at_exit a single linked list but not RArray, not to mark the registered functions by the write barrier. based on the patches by Evan Phoenix. [ruby-core:73908] [Bug #12095] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18merge revision(s) 54465: [Backport #12237]naruse
* thread.c (update_coverage): Do not track coverage in loaded files after Coverage.result. Avoids out-of-bounds access. [Bug #12237] * ext/coverage/coverage.c (coverage_clear_result_i): document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18merge revision(s) 54444: [Backport #12233]naruse
* ext/date/date_core.c (Init_date_core): [DOC] fix misplaced doc of DateTime. [ruby-core:74729] [Bug #12233] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-12merge revision(s) 54258: [Backport #12182]naruse
* ext/openssl/extconf.rb: check SSL_CTX_set_next_proto_select_cb function rather than OPENSSL_NPN_NEGOTIATED macro. it exists even if it is disabled by OpenSSL configuration. [ruby-core:74384] [Bug #12182] * ext/openssl/ossl_ssl.c: update #ifdef(s) as above. * test/openssl/test_ssl.rb: skip NPN tests if NPN is disabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-01merge revision(s) 53722: [Backport #12232]naruse
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): Fix Ripper.lex error in dedenting squiggly heredoc. heredoc tree is also an array of Elem in the outer tree. [Fix GH-1234] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 53724: [Backport #11946]naruse
* string.c (str_new_frozen): if the given string is embeddedable but not embedded, embed a new copied string. [Bug #11946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 53868: [Backport #12071]naruse
* ext/extmk.rb: add cygwin case, nothing excluded. [ruby-core:73806] [Bug#12071] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 54097: [Backport #12069]naruse
* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): document as MT-unsafe [ruby-core:73803] [Bug #12069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 54022: [Backport #11893]naruse
* ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb: fix method name typo. [ruby-core:72513] [Bug #11893] The patch provided by Akira Matsuda. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 54021: [Backport #11891]naruse
* ext/tk/lib/tkextlib/tcllib/toolbar.rb: fix method name typo. [ruby-core:72511] [Bug #11891] The patch provided by Akira Matsuda. [ruby-core:72510] [Bug #11890] The patch provided by Akira Matsuda. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 54020: [Backport #11890]naruse
* ext/tk/lib/tkextlib/blt/tree.rb: fix method name typo. [ruby-core:72510] [Bug #11890] The patch provided by Akira Matsuda. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 54018: [Backport #11886]naruse
* ext/tk/lib/tk/menubar.rb: fix a typo in font name. [ruby-core:72505] [Bug #11886] The patch provided by Akira Matsuda. * ext/tk/sample/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 54139: [Backport #12185]naruse
* ext/socket/option.c (inspect_tcpi_msec): more accurate condition for TCPI msec member inspection function. [ruby-core:74388] [Bug #12185] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 53677: [Backport #11877]naruse
* ext/socket/socket.c (sock_gethostname): support unlimited size hostname. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 53557,53561: [Backport #11958]naruse
* ext/socket/option.c (check_size): extract a macro to check binary data size, with a consistent message. * ext/socket/option.c (sockopt_byte): fix error message, sizeof(int) differs from sizeof(unsigned char) in general. * ext/socket/option.c (sockopt_bool): relax boolean size to be one too not only sizeof(int). Winsock getsockopt() returns a single byte as a boolean socket option. [ruby-core:72730] [Bug #11958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 53435: [Backport #11945]naruse
* ext/stringio/stringio.c (strio_binmode): implement to set encoding * test/stringio/test_stringio.rb (test_binmode): new test [ruby-core:72699] [Bug #11945] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29merge revision(s) 53299: [Backport #11870]naruse
* compile.c, cont.c, doc, man: fix common misspelling. [ruby-core:72466] [Bug #11870] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23io/console: fix gem build failure on Windowsnobu
* ext/io/console/extconf.rb: fix gem build failure on Windows. only win32_vk.inc is included in the gem and no dependencies for the header, so that gperf will not be mandatory. [ruby-core:72453] [Bug #11866] * ext/io/console/io-console.gemspec: include depend file and win32_vk header. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23rb_readwrite_syserr_failnobu
* io.c (rb_readwrite_syserr_fail): works with the given errno than thread local errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23prefer rb_syserr_failnobu
* file.c, io.c, util.c: prefer rb_syserr_fail with saved errno over setting errno then call rb_sys_fail, not to be clobbered potentially and to reduce thread local errno accesses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22ext/socket/init.c (rsock_init_sock): reject reserved FDsnormal
[ruby-core:72445] [Bug #11862] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22io-console.gemspec: BSD-2-Clausenobu
* ext/io/console/io-console.gemspec: change the license to BSD-2-Clause since "ruby" is no longer valid license as gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22fix r53231: raise Errno::EBADF like other OSesnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22io-console.gemspec: bump upnobu
* ext/io/console/io-console.gemspec: bump up to 0.4.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22* ext/bigdecimal/bigdecimal.gemspec: bump version to 1.2.8.mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22* ext/psych/lib/psych.rb: bump version to 2.0.17hsbt
* ext/psych/psych.gemspec: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e