passwd_iterate to close /etc/passwd on exception.
(group_ensure): move endgrent() call from group_iterate to close
/etc/group on exception.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
must not cast it to unsigned long, which may be shorter than
VALUE, and the result can be mere garbage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
RB_GC_GUARD() is only for variables on the machine stack, because it
forces a VALUE to be stored in a variable which should be referenced
from the GC, but does not add any reference path to the variable.
So it makes no sense for objects in heap.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
To avoid buffer overflow when smaller FD_SETSISE is used in ext
libraries.
* win32/win32.c (rb_w32_fdset): this function is not used anymore.
But we leave this for compatibility.
* win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller
FD_SETSISE is used in ext libraries. Dereference of fd_set pointer
causes SEGV.
* test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for
above.
* ext/-test-/win32/fd_setsize/depend: ditto.
* ext/-test-/win32/fd_setsize/extconf.rb: ditto.
* ext/-test-/win32/fd_setsize/fd_setsize.c: ditto.
[ruby-core:44588] [Bug #6352]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
OpenSSL::SSL::OP_NO_TLSv1_1
OpenSSL::SSL::OP_NO_TLSv1_2
to allow blocking specific TLS versions. Thanks to Justin Guyett for
pointing this out to me.
* test/openssl/test_ssl.rb: add tests to assert correct behavior when
blocking certain versions of TLS/SSL both on server and client side.
Also refactored tests to reduce boilerplate code a little.
* test/openssl/utils.rb: rescue Errno::ECONNRESET for tests where
client rejects the connection because a forbidden protocol version
was used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
SSLContext#version to inspect the version that was negotiated for
a given connection.
* ext/openssl/extconf.rb: detect TLS 1.1 & 1.2 support.
* test/openssl/test_ssl.rb: add tests for TLS 1.1 & 1.2 given they
are supported by the native OpenSSL being used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(Readline.special_prefixes): new function. An original patch was
created by nagachika. [Feature #5784]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(Readline.insert_text, Readline.redisplay): new function. An
original patch was created by nagachika. [Feature #5785]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
long may be larger than sha2_word32.
* ext/digest/sha2/sha2.c (SHA{256,512,384}_{Final,End}): should clear
whole content, not pointer size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
since zlib-1.2.7.
* ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
unsigned long long on Win64.
[ruby-core:44636][Bug #6364] reported by raylinn@gmail.com (ray linn)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
format.
(addrinfo_mload): show more information on "too long AF_UNIX path"
error.
(addrinfo_unix_path): ditto for "too short AF_UNIX address" and
"too long AF_UNIX address" error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
when it is too long for Unix socket.
* ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
* ext/socket/socket.c (sock_s_pack_sockaddr_un): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e