aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* win32ole.c: fix long conversionnobu2016-08-131-1/+1
| | | | | | | * ext/win32ole/win32ole.c (ole_val2variant): reuse the converted result for V_I8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: fix long conversionnobu2016-08-131-7/+10
| | | | | | | * ext/win32ole/win32ole.c (ole_val2variant): get rid of repeated conversions and fix a compile error due to V_I8 in old VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* getnameinfo.c: rubysocket.h for inet_ntopnobu2016-08-132-1/+2
| | | | | | | * ext/socket/getnameinfo.c: needs rubysocket.h for fallback definition of inet_ntop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (ole_val2variant): fix integer conversion insuke2016-08-121-3/+9
| | | | | | | | cygwin64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/resolv: fix for cygwinnobu2016-08-101-11/+5
| | | | | | | | | | * ext/win32/resolv/resolv.c: needs windows.h for iphlpapi.h on cygwin. [ruby-core:76791] [Bug #12663] * ext/win32/resolv/resolv.c (w32error_make_error): use Win32::Resolv::Error, an alias of Win32::Registry::Error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/resolv: fix for cygwinnobu2016-08-102-1/+4
| | | | | | | | | * ext/win32/resolv/resolv.c: needs windows.h for iphlpapi.h on cygwin. [ruby-core:76791] [Bug #12663] * ext/win32/resolv/resolv.c (w32error_make_error): use Win32::Resolv::Error, an alias of Win32::Registry::Error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk: Tk is removed from stdlib. [Feature #8539]naruse2016-08-091054-156749/+0
| | | | | | https://github.com/ruby/tk is the new upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib.c: repeated checks and conversions [ci skip]nobu2016-08-091-6/+8
| | | | | | | * ext/tk/tcltklib.c (ip_init): get rid of repeated checks and conversions in StringValueCStr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib.c: use StringValueCStr [ci skip]nobu2016-08-091-13/+13
| | | | | | | | | | | * ext/tk/tcltklib.c (set_max_block_time, tcl_protect_core, ip_init, ip_create_slave_core, get_obj_from_str, ip_cancel_eval_core, lib_set_system_encoding, alloc_invoke_arguments, lib_merge_tklist): use StringValueCStr instead of StringValuePtr for values to be passed to Tcl interperter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib.c: use PRIsVALUE [ci skip]nobu2016-08-091-5/+1
| | | | | | | * ext/tk/tcltklib.c (set_max_block_time): use PRIsVALUE to get rid of dangling pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib.c: missing break [ci skip]nobu2016-08-091-0/+1
| | | | | | | | * ext/tk/tcltklib.c (set_max_block_time): fix missing break. TclTkLib.set_max_block_time(1) works but TclTkLib.set_max_block_time(1.0) didn't. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltk.rb: suppress a warning [ci skip]nobu2016-08-091-0/+1
| | | | | | | * ext/tk/lib/tcltk.rb (TclTkWidget#initialize): suppress an "assigned but unused variable" warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib/sample2.rb: use attr_accessor [ci skip]nobu2016-08-091-1/+1
| | | | | | | | * ext/tk/sample/tcltklib/sample2.rb (Othello::BoardView::Square): use attr_accessor instead of attr with optional boolean argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use true and false [ci skip]nobu2016-08-095-14/+14
| | | | | | | | | | * ext/tk/lib/tk/texttag.rb, ext/tk/sample/tcltklib/sample2.rb, ext/tk/sample/tkline.rb, ext/tk/sample/tktimer.rb: use true and false instead of TRUE and FALSE. * ext/win32ole/sample/ienavi.rb (stop_msg_loop): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/sample/excel1.rb, ext/win32ole/sample/excel2.rb,suke2016-08-085-7/+7
| | | | | | | | | | ext/win32ole/sample/excel3.rb, ext/win32ole/sample/ie.rb, ext/win32ole/sample/ienavi.rb, ext/win32ole/sample/ienavi2.rb: use true instead of deprecated TRUE. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: suppress a warningnobu2016-08-071-3/+3
| | | | | | * ext/extmk.rb: get rid of shadowing outer local variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: remove sysquotenobu2016-08-071-7/+3
| | | | | | * ext/extmk.rb (sysquote): removed. unnecessary since r52161. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: avoid undefined behavior on empty SSL_writenormal2016-08-061-1/+7
| | | | | | | | | | | | | | | | | | | SSL_write(3ssl) manpage has this in the WARNINGS section: When calling SSL_write() with num=0 bytes to be sent the behaviour is undefined. And indeed, the new test case demonstrates failures when empty strings are used. So, match the behavior of IO#write, IO#write_nonblock, and IO#syswrite by returning zero, as the OpenSSL::SSL::SSLSocket API already closely mimics the IO one. * 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/trunk@55822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket/option.c: inet_ntopnobu2016-08-023-23/+9
| | | | | | | * 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/trunk@55797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib.c: remove RUBY_VERSIONnobu2016-08-022-10/+13
| | | | | | | * ext/tk/tcltklib.c (tcltklib_compile_info): remove RUBY_VERSION, use RUBY_API_VERSION instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tcltklib.c: compile infonobu2016-08-021-39/+20
| | | | | | | * ext/tk/tcltklib.c (tcltklib_compile_info): build compile info statically. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: build gemsnobu2016-08-011-7/+30
| | | | | | | * ext/extmk.rb: [EXPERIMENTAL] build extension libraries in extracted gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/*, test/json/json_parser_test.rb: Update json-2.0.2.hsbt2016-08-015-9/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv.c: fix commit missnobu2016-07-311-1/+0
| | | | | | | * ext/win32/resolv/resolv.c (Init_resolv): remove dead code. [Bug #12604] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/resolv: get_dns_server_listnobu2016-07-313-13/+88
| | | | | | | | * ext/win32/resolv/resolv.c (get_dns_server_list): [Win32] get DNS servers only for connected network devices by GetNetworkParams API. [Bug #12604] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_funcallvnobu2016-07-297-16/+16
| | | | | | | * *.c: rename rb_funcall2 to rb_funcallv, except for extensions which are/will be/may be gems. [Fix GH-1406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* json/ext: remove stale directorynobu2016-07-141-1/+0
| | | | | | | | * ext/json/lib/json/ext: remove stale directory. bundled extension libraries are placed under the directory for each architectures, but not mixed with plain text script libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2016-07-141-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/**/*.rb: merge original files from upstream repository.hsbt2016-07-1420-21/+16
| | | | | | It only fixes styles of frozen string literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stringio.c: convert arguments just oncenobu2016-07-111-12/+32
| | | | | | | | * ext/stringio/stringio.c (strio_each, strio_readlines): convert arguments just once before reading, instead of conversions for each lines, as r55603. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependenciesnobu2016-07-0631-81/+535
| | | | | | | | * common.mk (compile.o, loadpath.o): update dependencies. * common.mk (vm_call.o): remove stale object dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Local header dependenciesnobu2016-07-066-2/+9
| | | | | | | | | | | * lib/mkmf.rb (create_makefile): store $headers in LOCAL_HDRS for depend files. * ext/digest/digest_conf.rb (digest_conf): add implementation specific headers to $header. * ext/digest/{md5,rmd160,sha1,sha2}/depend: add LOCAL_HDRS to the dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* probes.dmyh: remove preprocessor directivesnobu2016-07-061-1/+0
| | | | | | | | | | * tool/gen_dummy_probes.rb: remove include and conditional directives from probes.dmyh which are removed by preprocessing. * common.mk: remove unnecessary dependencies on vm_opts.h via probes.dmyh. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert ext/json/parser/prereq.mknobu2016-07-061-0/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2016-07-051-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/*, test/json/*: Update json-2.0.1.hsbt2016-07-0512-742/+371
| | | | | | | | Changes of 2.0.0: https://github.com/flori/json/blob/f679ebd0c69a94e3e70a897ac9a229f5779c2ee1/CHANGES.md#2015-09-11-200 Changes of 2.0.1: https://github.com/flori/json/blob/f679ebd0c69a94e3e70a897ac9a229f5779c2ee1/CHANGES.md#2016-07-01-201 [Feature #12542][ruby-dev:49706][fix GH-1395] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Magic numbersnobu2016-06-301-10/+8
| | | | | | | * ext/cgi/escape/escape.c (optimized_unescape_html): remove magic numbers for literal lengths. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initialize IDnobu2016-06-301-2/+10
| | | | | | | * ext/cgi/escape/escape.c (accept_charset): initialize the static ID for theha class variable once at first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych_jars.rb: removed needless file required to JRuby.hsbt2016-06-291-6/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: fix for OpenSSL 1.0.0trhe2016-06-291-24/+34
| | | | | | | * ext/openssl/ossl_ocsp.c: The "reuse" behavior of d2i_ functions does not work well with OpenSSL 1.0.0t. So avoid it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/md5/md5ossl.h: Remove excess semicolons.ngoto2016-06-287-18/+18
| | | | | | | | | | | | | | | 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. * ext/openssl/ossl_pkey_rsa.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Convert arguments firstnobu2016-06-261-8/+11
| | | | | | | * ext/win32/lib/Win32API.rb (Win32API#initialize): convert arguments before dlopen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Explicit ".dll" suffixnobu2016-06-262-2/+8
| | | | | | | | | | | | * ext/win32/lib/Win32API.rb (Win32API#initialize): Cygwin 2.5.2-1 (perhaps) seems to no longer append ".dll" suffix implicitly. * ext/win32/lib/win32/resolv.rb (Win32::Resolv): ditto. Fix the error reported by yamataka AT u08.itscom.net in [ruby-list:50339], and pointed out and patched by cerberus AT m3.kcn.ne.jp in [ruby-list:50341]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-06-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/*, test/psych/*: Upate psych 2.1.0hsbt2016-06-245-34/+59
| | | | | | This version fixed [Bug #11988][ruby-core:72850] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: add OpenSSL::OCSP::SingleResponserhe2016-06-191-19/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/openssl/ossl_ocsp.c: Add OCSP::SingleResponse that represents an OCSP SingleResponse structure. Also add two new methods #responses and #find_response to OCSP::BasicResponse. A BasicResponse has one or more SingleResponse. We have OCSP::BasicResponse#status that returns them as an array of arrays, each containing the content of a SingleResponse, but this is not useful. When validating an OCSP response, we need to look into the each SingleResponse and check their validity but it is not simple. For example, when validating for a certificate 'cert', the code would be like: # certid_target is an OpenSSL::OCSP::CertificateId for cert basic = res.basic result = basic.status.any? do |ary| ary[0].cmp(certid_target) && ary[4] <= Time.now && (!ary[5] || Time.now <= ary[5]) end Adding OCSP::SingleResponse at the same time allows exposing OCSP_check_validity(). With this, the code above can be rewritten as: basic = res.basic single = basic.find_response(certid_target) result = single.check_validity * test/openssl/test_ocsp.rb: Test this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: allow passing absolute times in OCSP::BasicResponse#add_statusrhe2016-06-192-31/+63
| | | | | | | | | | | | | | | | | * ext/openssl/ossl_ocsp.c (ossl_ocspbres_add_status): Allow specifying the times (thisUpdate, nextUpdate and revocationTime) with Time objects. Currently they accepts only relative seconds from the current time. This is inconvenience, especially for revocationTime. When Integer is passed, they are still treated as relative times. Since the type check is currently done with rb_Integer(), this is a slightly incompatible change. Hope no one passes a relative time as String or Time object... Also, allow passing nil as nextUpdate. It is optional. * ext/openssl/ruby_missing.h: Define RB_INTEGER_TYPE_P() if not defined. openssl gem will be released before Ruby 2.4.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: implement initialize_copy for OpenSSL::OCSP::*rhe2016-06-191-0/+80
| | | | | | | | | | * ext/openssl/ossl_ocsp.c: Implement OCSP::{CertificateId,Request, BasicResponse,Response}#initialize_copy. [ruby-core:75504] [Bug #12381] * test/openssl/test_ocsp.rb: Test them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: implement initialize_copy method for PKey classesrhe2016-06-194-12/+147
| | | | | | | | | | | | | | * ext/openssl/ossl_pkey_dh.c, ext/openssl/ossl_pkey_dsa.c, ext/openssl/ossl_pkey_ec.c, ext/openssl/ossl_pkey_rsa.c: Implement initialize_copy method for OpenSSL::PKey::*. [ruby-core:75504] [Bug #12381] * test/openssl/test_pkey_dh.rb, test/openssl/test_pkey_dsa.rb, test/openssl/test_pkey_ec.rb, test/openssl/test_pkey_rsa.rb: Test they actually copy the OpenSSL objects, and modifications to cloned object don't affect the original object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: add 'const's required in OpenSSL masterrhe2016-06-195-17/+17
| | | | | | | | | | * ext/openssl/ossl_pkey.h, ext/openssl/ossl_pkey_dh.c, ext/openssl/ossl_pkey_dsa.c, ext/openssl/ossl_pkey_rsa.c: A few days ago, OpenSSL changed {DH,DSA,RSA}_get0_*() to take const BIGNUM **. https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=fd809cfdbd6e32b6b67b68c59f6d55fbed7a9327 [ruby-core:75225] [Feature #12324] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e