summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2011-09-27merge revision(s) 33333:kosaki
* ext/openssl/ossl_asn1.c: fix int_ossl_asn1_decode0_cons when being fed arbitrary string values. Clearly distinguish between the cases "universal, infinite and not a SEQUENCE or SET" and "universal SEQUENCE or SET, possibly infinite". Raise error for universal tags that are not infinite. * test/openssl/test_asn1.rb: add a test for this. Thanks to Hiroshi Yoshida for reporting this bug. [Bug #5363] [ruby-dev:44542] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-23* ext/openssl/ossl_asn1.cemboss
ext/openssl/ossl_pkey.c: Remove unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-12merge revision(s) 33256:kosaki
* thread.c (rb_thread_select): fix to ignore an argument modification of rb_thread_fd_select(). based on a patch by Eric Wong. [Bug #5306] [ruby-core:39435] * thread.c (rb_fd_rcopy): New. for reverse fd copy. * test/-ext-/old_thread_select/test_old_thread_select.rb (test_old_select_false_positive): test for bug5306. * ext/-test-/old_thread_select/old_thread_select.c (fdset2array): New. convert fdsets to array. * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select): return 'read', 'write', 'except' argument of rb_thread_select() to ruby script. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-08merge revision(s) 33225:naruse
* ext/nkf/nkf-utf8/nkf.c: import nkf 2.1.2 (be9c280) Bump version number/release date only. to UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-31merge revision(s) 33142:naruse
* ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30merge revision(s) 33130:kosaki
* ext/-test-/old_thread_select/old_thread_select.c (old_thread_select): typo. * test/-ext-/old_thread_select/test_old_thread_select.rb (TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead of SIGUSR1 because the former is general and the latter is platform dependent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30merge revision(s) 33124:naruse
------------------------------------------------------------------------ r33124 | naruse | 2011-08-30 14:21:27 +0900 (Tue, 30 Aug 2011) | 1 line Don't include complex and rational; fix r33122. ------------------------------------------------------------------------ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30merge revision(s) 33122:naruse
* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1). [Bug #5173] [ruby-core:38866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* backport r33117 from trunk.kosaki
* thread.c (rb_thread_select): rewrite by using rb_thread_fd_select(). old one is EINTR unsafe. Patch by Eric Wong. [Bug #5229] [ruby-core:39102] * test/-ext-/old_thread_select/test_old_thread_select.rb: a testcase for rb_thread_select(). * ext/-test-/old_thread_select/old_thread_select.c: ditto. * ext/-test-/old_thread_select/depend: ditto. * ext/-test-/old_thread_select/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-28* backport r33106 from trunk.nagachika
* ext/date/date_parse.c (date_zone_to_diff): keep a temporary string stored in variable while the contents buffer is beeing used. * ext/date/date_parse.c (date_zone_to_diff): get rid of out of bounds memory read. [ruby-dev:44409] [Bug #5213] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* backport r33086 from trunk.drbrain
* ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch by Luke Gruber. [#5203] * ext/pty/lib/expect.rb: ditto * lib/mathn.rb: ditto * lib/net/http.rb: ditto * lib/open-uri.rb: ditto * lib/ostruct.rb: ditto * lib/tempfile.rb: ditto * lib/thread.rb: ditto * lib/weakref.rb: ditto * sample/webrick/httpproxy.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-25* backport r33066 from trunk.drbrain
* ext/openssl/lib/openssl/bn.rb: Hide copyright info from RDoc. * ext/openssl/lib/openssl/digest.rb: ditto * ext/openssl/lib/openssl/cipher.rb: ditto * backport r33065 from trunk. * ext/openssl/ossl_digest.c: Document OpenSSL::Digest::digest and add an example to OpenSSL::Digest. Patch by Sylvain Daubert. [Ruby 1.9 - Bug #5166] * ext/openssl/lib/openssl/digest.rb (module OpenSSL): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24* ext/psych/lib/psych.rb: Fixing psych version number.tenderlove
* ext/psych/psych.gemspec: updating the gemspec. Conflicts: ext/psych/psych.gemspec git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24* ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to betenderlove
UTF-8. * test/psych/test_encoding.rb: test yaml dump encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23* backport r33023 from trunk.nahi
* ext/zlib/zlib.c (gzfile_read_header): Ensure that each section of gzip header is readable to avoid SEGV. * test/zlib/test_zlib.rb (test_corrupted_header): Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-21Merge commit r32895 from trunk:ngoto
* ext/fiddle/conversions.c (generic_to_value): ffi_arg and ffi_sarg should be used to handle shorter return value. fix [Bug #3861] [ruby-core:32504] * ext/fiddle/closure.c (callback): ditto * ext/fiddle/conversions.h (fiddle_generic): ditto * ext/fiddle/conversions.c (value_to_generic): char, short and int are strictly distinguished on big-endian CPU, e.g. sparc64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-20* ext/stringio/stringio.c (strio_read): return new string if nilnobu
is explicitly given as a buffer ([Bug #5207]), otherwise set the encoding. also removed dead code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-17Merge commit r32996 from trunk:mrkn
* ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal): add a new function for raising error when an object cannot coerce into BigDecimal. [Bug #5172] * ext/bigdecimal/bigdecimal.c (BigDecimalValueWithPrec): use cannot_be_coerced_into_BigDecimal function. * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto. * ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto. * test/bigdecimal/test_bigdecimal.rb: test for the avobe changes. * test/bigdecimal/testbase.rb (under_gc_stress): add a new utility method to run tests under the condition of GC.stress = true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-16* backport r32992 from trunk.emboss
* ext/openssl/ossl_x509cert.c: Add class documentation for OpenSSL::X509::Certificate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-16* backport r32987 from trunk.emboss
* ext/openssl/ossl_pkey.c: corrected docs, OpenSSL::PKey::DH does *not* support #sign/verify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-16* backport r32981 and r32982 from trunk.drbrain
* ext/dl: Add documentation. Patch by Vincent Batts. [Ruby 1.9 - Bug #5192] * ext/.document (fiddle): Remove duplicate entry * ext/fiddle: Complete documentation of Fiddle. Patch by Vincent Batts. [#5192] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-15* backport r32977 from trunkdrbrain
* ext/socket: Make Socket documentation appear. Add documentation for Socket, TCPServer, SOCKSSocket. Patch by Sylvain Daubert. [Ruby 1.9 - Feature #5182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-15* backport r32973 from trunk.emboss
* ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression. * test/openssl/test_ssl.rb: Add a test for it. Thanks to Eric Wong for the patch. [Ruby 1.9 - Feature #5183] [ruby-core:38911] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-13 * ext/date/date_core.c: [ruby-core:38861]tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-13* backport r32962+r32965 from trunk.nagachika
* ext/date/date_parse.c (parse_ddd_cb): fix r32896. RB_GC_GUARD insertion position was mistaken. [ruby-dev:44337] [Bug #5152] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-13* ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.tenderlove
[ruby-core:38913] * test/psych/test_yaml.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-13 * ext/date/date_core.c (date_strftime_alloc): followed the changetadf
of r32885. * NEWS: followed the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-12 * ext/date/date_core.c: [ruby-core:38855].tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-12* Backport r32950 from trunk.drbrain
* ext/digest/digest.c: Add documentation for the Digest module. Patch by Sylvain Daubert. [Ruby 1.9 - Bug #5167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-09merge revision(s) 32859:nagachika
* ext/date/date_parse.c (date_zone_to_diff): add RB_GC_GUARD. [ruby-dev:44337] [Bug #5152] * ext/date/data_parse.c (parse_ddd_cb): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-07* backport r32876 from trunk.ktsj
* ext/objspace/objspace.c: fix typos in a document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 * ext/date/date_core.c: an issue that is same as [ruby-dev:44071].tadf
* ext/date/date_strftime.c: identical to [ruby-dev:44112]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30Merge commit r32754:mrkn
* ext/bigdecimal/bigdecimal.c (BigDecimal_version): version 1.1.0. * ext/bigdecimal/bigdecimal.gemspec: turn into a default gem. * tool/rbinstall.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30* ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):mrkn
revive zero and implicit precision support as a deprecated feature. * test/bigdecimal/test_bigdecimal_util.rb: modify a test for the above change. * NEWS: describes the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29* ext/socket/lib/socket.rb (udp_server_sockets): unused variableakr
removed. patch by Jeremy Evans. [ruby-core:38600] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29* ext/socket/mkconstants.rb: fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29* ext/socket/mkconstants.rb: use whitespaces as a separator.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29* ext/socket/mkconstants.rb: add documents for constants.akr
patch by Eric Hodel. [ruby-core:37853] [Bug #4989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28merge revision 32725:nagachika
* ext/fiddle/closure.c (callback): use rb_ary_tmp_new() instead of xmalloc() to allocate an array for arguments of callback procedure, to prevent arguments from being swept by GC. [ruby-core:38546] [Bug #4929] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28* backport r32723 from trunk.nahi
* ext/openssl/ossl_cipher.c (ossl_cipher_initialize): Avoid possible SEGV from AES encryption/decryption. Processing data by Cipher#update without initializing key (meaningless usage of Cipher object since we don't offer a way to export a key) could cause SEGV. In OpenSSL, the EVP which has EVP_CIPH_RAND_KEY flag (such as DES3) allows uninitialized key, but other EVPs (such as AES) does not allow it. Calling EVP_CipherUpdate() without initializing key causes SEGV so we set the data filled with "\0" as the key by default. See #2768. * test/openssl/test_cipher.rb: test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26Merge revisions 32676, 32677, 32679, 32680:mrkn
* ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d): zero or negative precision is error. fixes #5098. [ruby-dev:44210] * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for specifying precision. fixes #5098. [ruby-dev:44210] * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added for symmetry to BigDecimal() function with an Integer. fixes #5098. [ruby-dev:44210] * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added for adapting other Numeric subclasses. [ruby-dev:44245] * test/bigdecimal/test_bigdecimal_util.rb: add tests for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26Merge revision 32674:mrkn
* bigdecimal/bigdecimal.c (VpDup) a new function for duplicating a BigDecimal. * bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new BigDecimal from another BigDecimal using BigDecimal global function or constructor. [ruby-dev:44245] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25* ext/openssl/lib/openssl/{x509.rb,ssl.rb}: Add deprecation warning nahi
for openssl/{x509,ssl} usage. Users should require "openssl" instead of "openssl/ssl" and "openssl/x509". Start of transition period introduced by [ruby-dev:38018]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25* backport r32662 from trunk.nahi
* ext/openssl/lib/openssl/x509.rb: Cosmetic change: move definition introduced in r30152 to x509-internal.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25* backport r32658 from trunk.nahi
* ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Avoid randomly generated SSLError from SSLSocket just after invoking SSLSocket#close. OpenSSL's SSL_shutdown could try to send alert packet and it might set SSLerr(global error stack) as the result. It causes the next SSL read/write operation to fail by unrelated reason. By design, we're ignoring any error at SSL_shutdown() so we clear global error stack after SSL_shutdown is called. See #5039. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-24* ext/socket/extconf.rb: refine the recvmsg test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-24* ext/socket/extconf.rb: fix the recvmsg test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23* ext/socket/extconf.rb: test recvmsg allocates file descriptors forakr
fd passing even with MSG_PEEK. * ext/socket/ancdata.c: use the above test result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23* io.c (rb_update_max_fd): validate fd.akr
* ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add msg_peek_p argument for the declaration. * ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument. assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd when MSG_PEEK. (rsock_discard_cmsg_resource): add msg_peek_p argument. (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with msg_peek_p argument. * ext/socket/unixsocket.c (unix_recv_io): call rsock_discard_cmsg_resource with msg_peek_p argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22merge revision(s) 32586:naruse
* ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror() before calling dlsym(). [ruby-dev:44091] [Bug #5021] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e