Граф коммитов

4295 Коммитов

Автор SHA1 Сообщение Дата
tadf b6de661b54 trivial changes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-14 21:39:25 +00:00
tadf c80308119b trivial changes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 22:39:13 +00:00
akr 23e7a4e285 * ext/etc/etc.c (passwd_ensure): move endpwent() call from
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
2012-05-13 14:00:16 +00:00
tadf b1984f9d52 * ext/date/date_strftime.c: removed unused code and changed the style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 09:14:46 +00:00
tadf 2168ae602f * ext/date/date_strftime.c: refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 08:39:18 +00:00
drbrain 66796b4c7e * ext/sdbm/init.c: Added documentation. Patch by Justin Collins,
cleanup by Zachary Scott.  [ruby-trunk - #6410]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 22:00:43 +00:00
nobu af310963ab * ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
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
2012-05-11 05:09:58 +00:00
nobu 9cc7e9d1e8 Revert r35616 "* ext/bigdecimal/bigdecimal.c: use RB_GC_GUARD. [ruby-dev:45627]"
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
2012-05-11 04:50:54 +00:00
mrkn c8b3528383 * ext/bigdecimal/bigdecimal.c: use RB_GC_GUARD. [ruby-dev:45627]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 18:44:25 +00:00
tadf 16c364ade4 * ext/date/date_core.c: reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 21:25:34 +00:00
shirosaki 5ccee663e9 * include/ruby/win32.h (FD_SET): change function to macro.
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
2012-05-08 12:47:25 +00:00
ayumin 965121cdc5 * ext/date/date_core.c: improving introduction in Date/DateTime doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 04:47:35 +00:00
naruse c047e1ec12 * ext/openssl/ossl_ssl.c (ossl_start_ssl): remove useless rb_sys_fail
before ossl_raise. this cause a test failure on Linux.
  http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 22:46:15 +00:00
nobu 9c4fc91c6b * ext/json/lib/json/generic_object.rb: missing file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 18:44:36 +00:00
naruse 5a00be2bf7 * ext/json: Merge JSON 1.7.1.
e5b9a9465c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 16:00:49 +00:00
emboss 5f7be3150f * ext/openssl/ossl_ssl.c: add support for option flags
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
2012-05-07 11:57:01 +00:00
naruse 251001c829 Revert r35560.
This breaks tests:
http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T070102Z.log.html.gz

And don't change local codes, contribute it to upstream:
https://github.com/flori/json

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 08:46:50 +00:00
usa e9231035b2 * ext/json/parser/depend: need to specify the base directory for nmake.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 08:25:02 +00:00
nobu 0bd56268cb ext/json/fbuffer/fbuffer.h
* ext/json/fbuffer/fbuffer.h: comment-out unused functions.

* ext/json/parser/depend: add dependency.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 05:11:45 +00:00
naruse 0fce0545b6 * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): define IDs before
they are used. [ruby-core:44900] [Bug #6406]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 02:03:28 +00:00
nobu cc3f33073d rmd160.c: fix for huge data
* ext/digest/rmd160/rmd160.c (RMD160_Update): fix for huge data.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 01:27:59 +00:00
emboss 060184c347 * ext/openssl/ossl_ssl.c: support TLSv1.1 & TLSv1.1. Add
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
2012-05-06 22:26:08 +00:00
kouji 7c602ea07f * ext/readline/readline.c (Readline.special_prefixes=)
(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
2012-05-02 00:47:57 +00:00
kouji 7a4b214558 * ext/readline/readline.c (Readline.pre_input_hook)
(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
2012-05-01 13:21:55 +00:00
nobu 28b7df7820 * revert r35510 and r35511 which caused removing the headers everytime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-01 07:15:18 +00:00
nobu d7228e5bba depends on ext/openssl/deprecation.rb
* ext/digest/*/depend: depends on ext/openssl/deprecation.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-01 06:52:28 +00:00
nobu d32155358c * ext/openssl/deprecation.rb (OpenSSL.check_func): check if header is
available for macro compatibility.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-01 05:18:02 +00:00
nobu e1d1397af8 * ext/digest/sha2/sha2.c (REVERSE32): exlicitly cast since unsigned
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
2012-04-30 21:04:16 +00:00
nobu 26e258c807 * ext/digest/*/extconf.rb: use pkg_config to use same library with
openssl.  [ruby-core:44755][Bug #6379]
* ext/openssl/deprecation.rb: extract check for broken Apple OpenSSL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 21:03:38 +00:00
akr ce007c7c86 * ext/zlib/extconf.rb: detect z_crc_t type which will be defined
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
2012-04-30 11:11:21 +00:00
ayumin 0456c36d03 * ext/openssl/lib/openssl/ssl.rb: add hostname to "hostname does not
match server cert." error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 00:11:44 +00:00
tenderlove 13edcbea75 * ext/psych/lib/psych/json/yaml_events.rb: implicit styles should not
be changeable for JSON events.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-29 19:44:18 +00:00
nobu 3380974143 * parse.y (assoc, parser_yylex): add syntax to splat keyword hash.
[ruby-core:44591][Feature #6353]
* compile.c (compile_array_): generate keyword splat insns.
* vm.c (m_core_hash_merge_kwd): merge keyword hash into intermediate
  hash.  leftward argument is prior currently.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-28 21:12:05 +00:00
nobu 82fa2995b5 * ext/-test-/win32/dln/extconf.rb: remove test DLL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-28 14:22:25 +00:00
usa 62d71852df * ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to
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
2012-04-27 03:36:33 +00:00
akr da12c793c4 * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
path in sockaddr_un, really.
  reported by nagachika.
  http://d.hatena.ne.jp/nagachika/20120426/ruby_trunk_changes_35474_35476


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26 22:18:03 +00:00
akr b82f8f7191 add a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26 13:24:52 +00:00
akr 4c87e9433a suppress a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26 13:24:34 +00:00
akr 1413510ed2 * ext/socket/raddrinfo.c (init_unix_addrinfo): support the longest
path in sockaddr_un.
  (inspect_sockaddr): ditto.
  (addrinfo_mdump): ditto.
  (addrinfo_mload): ditto.
  (rsock_unixpath_str): new function.
  (rsock_unixpath): removed.
  (rsock_unixaddr): use rsock_unixpath_str.

* ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
  path in sockaddr_un.
  (sock_s_unpack_sockaddr_un): ditto.
  (sock_s_gethostbyaddr): unused variable removed.

* ext/socket/unixsocket.c (rsock_init_unixsock): support the longest
  path in sockaddr_un.

* ext/socket/rubysocket.h (rsock_unixpath_str): declared.
  (rsock_unixpath): removed.

* test/socket/test_unix.rb: comment out test_nul because abstract unix
  sockets may contain NULs.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-26 03:34:12 +00:00
akr c1d27b8c8d * ext/socket/raddrinfo.c (init_unix_addrinfo): refine error message
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
2012-04-25 14:05:10 +00:00
akr 7c346a46d3 * ext/socket/raddrinfo.c (init_unix_addrinfo): show actual path length
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
2012-04-24 12:59:32 +00:00
nobu ce2dc60216 * ext/iconv: deprecated. [Feature #6322]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:56:11 +00:00
nobu 82801b9113 --with-broken-apple-openssl option
* ext/openssl/extconf.rb: add --with-broken-apple-openssl option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:47 +00:00
nobu 628d3807d2 * ext/openssl/ossl_pkcs5.c (ossl_pkcs5_pbkdf2_hmac): suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-22 12:43:53 +00:00
nobu f2e9040aff * ext/openssl/extconf.rb: ignore broken version by Apple.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-22 12:39:55 +00:00
nobu ec646dccdd * ext/openssl/extconf.rb: configure.in adds -Wall to warnflags, not
CPPFLAGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-22 12:22:57 +00:00
akr d6ba4bcaa5 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-20 10:51:25 +00:00
nobu 1ff181cf8c * ext/-test-/win32/dln/extconf.rb: need import library for ordinal
entry even on mingw.  [ruby-core:44441][Bug #6320]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-19 00:40:00 +00:00
drbrain 6878e597c4 * ext/curses/curses.c (window_nodelay): Fixed call-seq of nodelay to
include the '='.

  Improved description window.nodelay=.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 23:59:22 +00:00
drbrain ab0eb272f9 * io.c (io_readpartial): Document the output buffer parameter is
overwritten with the read contents even when non-empty.
  Patch by yu nobuoka.  [ruby-trunk - Bug #6285]
* io.c (io_read_nonblock):  ditto.
* io.c (io_read):  ditto.
* io.c (rb_io_sysread):  ditto.
* io.c (argf_read):  ditto.
* io.c (argf_readpartial):  ditto.
* ext/stringio/stringio.c (strio_read):  ditto.
* test/ruby/test_argf.rb (class TestArgf):  Add test for existing
  behavior of read outbuf.
* test/ruby/test_io.rb (class TestIO):  ditto.
* test/stringio/test_stringio.rb (class TestStringIO):  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 23:48:27 +00:00