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

4665 Коммитов

Автор SHA1 Сообщение Дата
usa 844ddfdd0d * test/minitest/metametameta.rb (MetaMetaMetaTestCase#assert_report):
support drive letter on Windows.  yes, the original code is metameta.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 02:23:15 +00:00
nobu fca2ac964d test/testunit: fix for recent minitest
* test/testunit/test_hideskip.rb (TestHideSkip#test_hideskip):
  MiniTest#puke now reports Skipped messages only if verbose mode.
* test/testunit/test_sorting.rb (TestTestUnitSorting#test_sorting):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 18:54:09 +00:00
naruse 49331ddec7 * lib/minitest/unit.rb (assert_match): refix of r35563.
r35563 breaks the intention of the original change.
  68858105b2
* lib/minitest/unit.rb (refute_match): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 17:49:53 +00:00
naruse 40f1939614 Correct requiring path to metametameta.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 17:49:48 +00:00
nobu 8545d2f4b9 test_ssl.rb: test only if necessary option is available.
* test/openssl/test_ssl.rb (test_forbid_tls_v1_{1,2}_{for_client,from_server}):
  test only if necessary option is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 17:18:55 +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
shugo 9be3aa1767 * lib/net/imap.rb (body_type_attachment): parse body type
"ATTACHMENT". [ruby-core:44849] [Bug #6397]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 04:05:44 +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 298258891d use assert_equal, assert_match, and so on.
* test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on.
* test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb,
  test/ruby/test_io_m17n.rb (assert_str_equal): ditto.
* test/rubygems/test_gem_remote_fetcher.rb
  (assert_data_from_{server,proxy}): ditto.
* test/test_pstore.rb (test_thread_safe): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 01:23:07 +00:00
nobu b5ba059a0b test_gem_installer.rb: fix argument order
* test/rubygems/test_gem_installer.rb (TestGemInstaller#test_dir): fix
  argument order.  expected value must come first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 01:16:32 +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
naruse ae4fa7951f Revert r35443.
Revert "* test/rubygems/test_gem_installer.rb: fix broken test for r35541."
* r35541 breaks exist tests, it should be a bug unless it is inteneded.
  there seems no such intention.
  68858105b2
* assert('mswin32' =~ Gem::Platform.local) won't output any useful
  information when it fails.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-05 13:15:29 +00:00
ayumin f406e3ac63 * test/rubygems/test_gem_installer.rb: fix broken test for r35541.
[ruby-core:44884][Bug #6405]
* test/rubygems/test_gem_platform.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-05 09:27:06 +00:00
ryan 6af843b9cb Imported minitest 2.12.1 (r7323)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-04 21:46:01 +00:00
naruse 95d4b3ba49 * test/zlib/test_zlib.rb (test_inflate): add a test for Zlib.inflate.
patched by headius (Charles Nutter). [ruby-core:44859] [Bug #6398]

* test/zlib/test_zlib.rb (test_deflate): add a test for Zlib.deflate.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-04 17:07:18 +00:00
naruse afd9ce9d9e * io.c (parse_mode_enc): remove warnings 'Ignoring internal encoding'.
[ruby-core:44455] [Bug #6324]

* io.c (io_encoding_set): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-04 16:14:51 +00:00
naruse 66b0d426ed rescue if it cannnot load psych.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-04 13:26:39 +00:00
naruse 09063f9d30 Embed backtrace to debug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-03 22:50:30 +00:00
naruse 8109c530b2 * lib/rdoc/parser.rb (RDoc.binary?): fix wrong regexp.
[ruby-core:44798] [Bug #6393]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-03 22:20:26 +00:00
nobu 9bee6cf51f rdoc: --extension option fix
* lib/rdoc/parser.rb (RDoc.alias_extension): a real file is irrelevant
  to aliasing.  [ruby-core:44796][Bug #6392]
* lib/rdoc/parser.rb (RDoc.zip?): non-existent file will not be a zip
  file.
* lib/rdoc/parser.rb (RDoc.can_parse_by_name): accept aliased
  extension file names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-03 16:33:22 +00:00
nobu 1348e3b9ac rdoc: non-binary multibyte
* lib/rdoc/parser.rb (RDoc.binary?): binary read data may have
  incomplete multibyte sequence.  [ruby-core:44798][Bug #6393]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-03 16:31:25 +00:00
nobu 9cf2170e78 * parse.y (parser_yylex): allow spaces between lambda arrow and
parenthesis.  [ruby-dev:45605][Feature #6390]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-02 14:21:23 +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
usa 633cebb0ef * test/ruby/test_settracefunc.rb: ignore traces from another threads
because Kernel.set_trace_func affects other threads.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-01 01:56:25 +00:00
akr 52af87a5a7 add an assertion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 14:45:31 +00:00
akr 7d89ecdc52 * lib/fileutils.rb (copy_metadata): use File.lchown and File.lchmod to
update meta data of symlinks.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 14:37:54 +00:00
nagachika c40e6f8257 * test/ruby/test_continuation.rb (tracing_with_set_trace_func): don't
call Continuation from other threads. [ruby-dev:45596] [Bug #6382]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 14:09:36 +00:00
ayumin 3893159530 * test/net/http/test_https.rb: update test for r35494
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 03:51:03 +00:00
tenderlove 75cff1d7d0 add a test for yaml ast roundtripping
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-28 22:24:01 +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 0a68f1200b * test/readline/test_readline.rb (setup): avoid affected by user's
inputrc file.  [ruby-dev:45584][Bug #6357]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-27 01:58:21 +00:00
nobu 664a13b732 test/readline/test_readline.rb: suppress bell
* test/readline/test_readline.rb (replace_stdio, with_pipe): suppress bell.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-27 01:41:02 +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
nagachika 2bc4268e79 * test/optparse/test_summary.rb (test_summary_containing_space): add
test for r35467. OptionParser#to_a shouldn't split banner by spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-25 16:36:14 +00:00
nobu 3c2f707f16 * lib/optparse.rb (OptionParser#to_a): split for each lines.
[ruby-dev:45568][Bug #6348]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 20:46:14 +00:00
naruse 276d82a7c8 Cent OS 5.6 wakes up in 4.989596sec from sleep(5).
http://c5632.rubyci.org/~chkbuild/ruby-trunk/log/20120424T070102Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 12:17:02 +00:00
usa 756ffef448 * enc/euc_jp.c: added EUC-JP-2004 and its alias EUC-JISX0213.
[ruby-dev:45571] [Feature #6349]
  Requested by Kyouhei Yanagita <yanagi@shakenbu.org>.

* enc/trans/japanese_euc.trans: ditto.

* enc/trans/JIS/JISX0213-[12]%UCS@{BMP,SIP}.src: JIS X 0213:2004 ->
  Unicode mapping table from NetBSD.

* enc/trans/JIS/UCS@{BMP,SIP}%JISX0213-[12].src: Unicode -> JIX X
  0213:2004 mapping table from NetBSD.

* tool/transcode-tblgen.rb: added SIP support.

* test/ruby/test_transcode.rb: tests of above changes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 11:14:18 +00:00
ko1 66d247bcb5 * compile.c: fix to output warning when the same literals
are available as a condition of same case clause.
  And remove infomation ('#n') because we can find duplicated
  condition with explicit line numbers.
  [ruby-core:38343] [Ruby 1.9 - Bug #5068]
* test/ruby/test_syntax.rb: add a test for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 09:20:42 +00:00
nobu 5f34227718 * parse.y (parser_yylex): EXPR_BEG by keywords is a start point of
commands.  [ruby-dev:45563][Bug #6347]
* parse.y (superclass): ditto for superclass.
* parse.y (parser_parse_string, parser_here_document): ditto for
  string interpolation.
* parse.y (parser_yylex): ditto for singleton class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 07:04:41 +00:00
nobu 4f2b00429e * lib/optparse.rb (OptionParser#to_a): should split by end-of-line
[ruby-dev:45568][Bug #6348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 06:51:44 +00:00
nobu a9917efd5d * lib/optparse.rb (OptionParser#to_a): String#to_a is no longer
defined.  [ruby-dev:45568][Bug #6348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 05:54:08 +00:00
nobu 770ddcdfe0 * hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.
[Feature #6276]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 03:46:55 +00:00
usa b05c95d93f * test/drb/drbtest.rb ({DRbCore,DRbAry}#teardown}: cannot pass SIGTERM
to another process on Windows, so use SIGINT instead.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 01:56:35 +00:00
nobu 28a8188e4d fix condition to set yaml engine
* test/rubygems/test_gem_specification.rb (test_to_yaml_emits_syck_compat_yaml):
  fix condition to set yaml engine.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 01:41:15 +00:00
mame 563762f6c5 * parse.y (primary): remove wrong "fixpos" that caused incorrect
source_location of blocks.  [ruby-core:42232] [Bug #5930]

* test/ruby/test_proc.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 15:23:41 +00:00
naruse b712455f98 Wait until the server stops.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 14:05:49 +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 e0431daa00 test with psych
* test/rubygems/test_gem_specification.rb (test_to_yaml_emits_syck_compat_yaml):
  test with psych.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:45 +00:00
nobu c2cc5fc961 ignore unnecessary test
* test/rubygems/test_gem_specification.rb (test_emits_zulu_timestamps_properly):
  ignore unnecessary test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:43 +00:00
nobu 77b1d88513 skip OpenSSL dependent tests if not available
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:41 +00:00
akr 146aff91c4 * test/socket/test_unix.rb (bound_unix_socket): make temporary
filename shorter for less possibility of Unix socket path over
  107 bytes when TMPDIR has long path.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:09:48 +00:00
usa ee8c98e5cc * win32/win32.c (szInternalCmds, internal_match, internal_cmd_match):
get rid of a segmentation fault with GCC 4.7.0.
  reported by raylinn@gmail.com (ray linn) at [ruby-core:44505]
  [Bug #6333], and patched by mame.

* test/ruby/test_system.rb (TestSystem#test_system): test for it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 11:47:02 +00:00
akr 8f16d22e99 * test/drb/drbtest.rb: rescue Errno::ESRCH for Process.kill.
[ruby-dev:45551] reported by NARUSE, Yui.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 10:55:39 +00:00
naruse eab4183f14 Wait until the proxy stops.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-22 15:04:44 +00:00
akr e16e961bab * lib/drb/extservm.rb (DRb::ExtServManager): don't use /bin/sh to
invoke service subprocess.  mark detach threads for clean up.

* test/drb/drbtest.rb: clean up the service subprocess in teardown.

* test/drb/test_drb.rb: set @service_name for teardown.

* test/drb/test_drbunix.rb: ditto.

* test/drb/test_drbssl.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-22 11:35:03 +00:00
naruse f46ffca1c7 avoid thread switching.
The test may fail if thread switches to d or e before assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-22 01:46:45 +00:00
seki b384fe5e4f * test/rinda/test_rinda.rb: fix sticks on some testsf problem
[Bug #6272]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-21 06:10:21 +00:00
drbrain 064bf602e0 * lib/rubygems: Update to RubyGems 1.8.23 which contains security
fixes:

  RubyGems now disallows redirection from HTTPS to HTTP.

  RubyGems now verifies SSL connections.

  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
  changes since 1.8.22.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-19 23:07:48 +00:00
nobu e0ffb9b59b * strftime.c (rb_strftime_with_timespec): fix carrir-up bug and
overwrite '+' with '-' if negative offset less than a hour.
  [ruby-core:44447][Bug #6323]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-19 07:33:55 +00:00
naruse ec0bd633e2 Run TC_JSONGenerate#test_gc in a separate process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-19 03:21:23 +00:00
naruse c1903a9f17 Fix multithread issue in the test of r35391
pipe() uses threads and its reader thread may work before the writer
writes "foob". On such case, the reader will raise error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-19 02:49:48 +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
naruse 61c1fb7058 Use mock of Gem::Security::OPT[:trust_dir]
Gem::Security::OPT[:trust_dir] depends Gem.user_home but doesn't reset
on setup/teardown.
NOTE: Gem.user_home won't be recovered now, so teardown doesn't work.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 23:14:26 +00:00
nobu 336cf57584 * test/ruby/test_time_tz.rb (TestTimeTZ): run TZ tests on Mac OS X,
except for "right" timezonez.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 07:10:38 +00:00
naruse cc6ab53f59 Run separate process this GC.stress test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 03:38:09 +00:00
naruse 8de83c5198 Disable GC for slow this test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 03:31:11 +00:00
nobu 9d96fc17d7 split method definitions
* test/ruby/test_time_tz.rb (TestTimeTZ#with_tz, TestTimeTZ#time_to_s):
  split method definitions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 01:58:49 +00:00
naruse 9e56e14f50 Run separate process if the test uses GC.stress.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 01:08:34 +00:00
drbrain 6c1da63bd7 * lib/rubygems: Update to RubyGems 1.8.22 plus r33517 and r35337 which
were ported to the rubygems git repository.

  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
  changes since 1.8.11.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 00:04:12 +00:00
drbrain 0ebe38eedd Revert r35370 due to bad source branch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 21:17:56 +00:00
drbrain 22d9456b79 * lib/rubygems: Update to RubyGems 1.8.22 plus r33517 and r35337 which
were ported to the rubygems git repository.

  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
  changes since 1.8.11.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 20:50:00 +00:00
nobu 43dbbefbdf * strftime.c (rb_strftime_with_timespec): fix padding of time zone
offset.  [ruby-dev:43287][Bug #4458]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 13:18:51 +00:00
naruse 77321aeed9 win32/dln is only for win32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 11:14:24 +00:00
nobu dad31f6e50 * dln.c (rb_w32_check_imported): skip ordinal entries. based on a
patch by phasis68 (Heesob Park) at [ruby-core:44381].
  [ruby-core:44371][Bug #6303]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 04:11:17 +00:00
naruse 164ced04de Add debug prints to inspect TC_JSONGenerate#test_gc's timeout issue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-15 07:37:45 +00:00
naruse 05af801f4c Adds another timeouts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 18:56:12 +00:00
naruse c26ea74ad6 * lib/webrick/server.rb (WEBrick::GenericServer#start):
partially revert r35315.

* test/webrick/test_server.rb (test_start_exception):
  received signal is delivered to the main thread, so it is needed to
  emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 02:30:43 +00:00
naruse deb0519aec * lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;
this method is to deny new connections, not shutdown yet.

* lib/webrick/server.rb (WEBrick::GenericServer#start):
  re-raise exception only when the exception is Interrupt (^C).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 06:21:50 +00:00
nobu 2417bd10d2 * test/ruby/test_autoload.rb: clear autoloaded paths.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 07:16:14 +00:00
naruse 1d6d4d2461 r35304 changes the exception.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 02:51:02 +00:00
ko1 ee7f8d4805 * compile.c (compile_array, compile_array_):
Divide big array (or hash) literals into several blocks and
  concatetene them.  There was a problem that a big array (hash)
  literal causes SystemStackError exception (stack overflow)
  because VM push all contents of the literal onto VM stack to
  make an array (or hash).  To solve this issue, we make several
  arrays (hashes) and concatenate them to make a big array (hash)
  object.
  ??
* compile.c (iseq_compile_each, setup_args): use modified
  compile_array.
* vm.c (m_core_hash_from_ary, m_core_hash_merge_ary,
  m_core_hash_merge_ptr): added for above change.
* id.c (Init_id), parse.y: add core method ids.
* bootstraptest/test_literal.rb: add simple tests.
* bootstraptest/test_eval.rb: remove rescue clause to catch
  SystemStackError exception.
* test/ruby/test_literal.rb: add tests to check no stack overflow.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 01:33:34 +00:00
drbrain 655738577f * lib/uri/generic.rb (module URI): URI now downcases the scheme to
follow RFC 2396 section 3.1.  [ruby-trunk - Feature #4551]
* test/uri/test_generic.rb (class URI):  Test for above


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 22:11:07 +00:00
drbrain ea9b6997cc * lib/net/protocol.rb (module Net): Added ReadTimeout to match
OpenTimeout.  ReadTimeout is now raised by rbuf_fill instead of
  Timeout::Error to help users distinguish what type of timeout
  occurred.  [ruby-trunk - Feature #6088]
* lib/net/pop.rb (module Net):  Updated documentation for ReadTimeout
  and OpenTimeout.
* lib/net/http.rb (module Net):  ditto
* lib/net/smtp.rb (module Net):  ditto
* lib/net/telnet.rb (module Net):  Net::ReadTimeout is now raised in
  waitfor to match Net::Protocol.
* test/net/http/test_http.rb:  Updated Timeout::Error expectation to
  Net::ReadTimeout.
* test/net/ftp/test_ftp.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 21:20:51 +00:00
drbrain 8c5c5a221f * lib/webrick/server.rb (module WEBrick::GenericServer): A server
will now continue only when a StandardError subclass is raised.  For
  other exception types the error will be logged at the fatal level and
  the server will safely stop.  Based on a patch by Alex Young.
  [ruby-trunk - Feature #6236]
* test/webrick/test_server.rb:  Test for new exception handling
  behavior.  Join the server thread instead of busy-waiting for it to
  shut down to remove race conditions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 20:28:11 +00:00
nobu db5265a82c * parse.y (rb_check_id_cstr): new function to check if ID is
registered with NUL-terminated C string.
* sprintf.c (rb_str_format): avoid inadvertent symbol creation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 13:31:23 +00:00
nobu a5d1da5d74 * sprintf.c (rb_str_format): fix exception message encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 13:01:16 +00:00
nobu 51f2207fc9 * test/ruby/test_sprintf.rb (test_named_untyped, test_named_typed):
split and add assertions for exception when named parameter after
  unnumbered.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 13:01:14 +00:00
nobu 23ba7541e5 * sprintf.c (rb_str_format): fix error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 12:43:56 +00:00
shirosaki 2f7290d4b3 * io.c (rb_io_eof): use eof() instead of io_fillbuf(). It's because
io_unread() doesn't work properly when reading CRLF with read(length)
  and mode 'r'.
  [ruby-core:44189][Bug #6271]

* test/ruby/test_io_m17n.rb (TestIO_M17N#test_read_crlf_and_eof):
  test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 12:05:19 +00:00
naruse 3e13081214 Set $VERBOSE=false in case of ruby -w.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 01:15:56 +00:00
drbrain 6ba4bd5858 * pack.c (pack_pack): Warn when an invalid character is found in the
format string when $VERBOSE is true.  [ruby-trunk - Feature #5219]
* pack.c (pack_unpack):  ditto
* test/ruby/test_pack.rb (class TestPack):  Test for warnings on
  invalid format characters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 22:33:58 +00:00
naruse 1a7f3d7cb7 It is wrong to expect the last output is "exit".
When lb.join is commented out as [ruby-dev:30653] says,
@keeper is living until the program truely die.
So after it outputs "exit.", it may output "#{i}: cont".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 19:34:34 +00:00
naruse a69e190e96 More increae timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 11:56:09 +00:00
naruse 66fd3a4eb5 Wait the server until it stops.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 10:19:28 +00:00
nobu f45fc7daa0 * error.c (rb_enc_raise): new function to raise an exception with
the message in the given encoding.  patched by now (Nikolai
  Weibull) at [ruby-core:41160].  [Feature #5650]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 10:07:07 +00:00
naruse a59dd4b489 Increae timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 09:23:14 +00:00
naruse 9a269ab175 start GC before GC.stress.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 07:19:08 +00:00
naruse 2eb5d1dea4 Add timeout to TC_JSONGenerate#test_gc.
http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20120409T230301Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 03:41:50 +00:00
nobu 04e3e2de56 * test/ruby/test_file.rb (TestFile#test_long_unc): fix for the case cwd is UNC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09 14:14:39 +00:00
nobu 3ed259abbc * win32/win32.c (isUNCRoot, winnt_stat): support long UNC.
[ruby-core:30623][Feature #3399]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09 14:10:32 +00:00
naruse 8c8796333a Wait until the callback is called with timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09 10:49:46 +00:00
nobu 41c199130a * parse.y (string_content, parser_yylex): count brace nesting to
dispatch embexpr_end.  [ruby-core:43775][Bug #6211]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09 06:16:07 +00:00
marcandre 6b18a8c2e9 * hash.c (rb_hash_set_default_proc): Accept nil, patch by Run Paint
[Feature #4234]

* test/ruby/test_hash.rb: test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09 04:07:53 +00:00
naruse 228a99a0b2 Add test for r35265.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-08 23:05:08 +00:00
naruse 71d114297f * complex.c (nucomp_expt): the result of f_complex_new2 may be a fixnum
with mathn. [ruby-core:44170] [Bug #6267]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-08 17:53:51 +00:00
naruse 63467e5263 Decrease the default level of try_fdopen.
Because it cause Bus Error:
http://u32.rubyci.org/~chkbuild/ruby-trunk/log/20120407T230202Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-08 13:46:50 +00:00
naruse 8474c90eac Don't run tests which can't run with editline.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-08 06:26:48 +00:00
naruse 9ec849ee08 * Remove unused variables.
* use Thread.pass instead of true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07 23:41:27 +00:00
naruse 56206ab8cd * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
use readpartial to get data even if the response is streaming data and
  each data is smaller than @buffer_size.
  patched by yu nobuoka. [ruby-dev:45471] [Bug #6230]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07 21:50:34 +00:00
shirosaki 42109a02f0 * include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of
new function.

* process.c (enum): add EXEC_OPTION_PGROUP and move the position
  above for the usage in proc_spawn_n().

* process.c (proc_spawn_n): add an argument to pass new option
  `new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to
  CreateProcessW(). This flag is necessary for the usage of
  Process.kill on the subprocess on Windows.

* process.c (rb_exec_arg_addopt): ditto.

* process.c (rb_spawn_process): ditto.

* process.c (documentation for rb_f_spawn): add documentation for new
  option `new_pgroup` of spawn.

* test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup):
  add tests for option `new_pgroup`.

* test/ruby/test_thread.rb
  (TestThreadGroup#test_thread_timer_and_interrupt):
  add option `new_pgroup: true` to spawn on Windows. It's needed for
  Process.kill on a subprocess.

* win32/win32.c (CreateChild): add an argument to pass
  dwCreationFlags of CreateProcessW().

* win32/win32.c (rb_w32_spawn): ditto.

* win32/win32.c (rb_w32_aspawn_flags): add new function to pass
  dwCreationFlags.

* win32/win32.c (rb_w32_aspawn): refactor to move the content to
  rb_w32_aspawn_flags().
  [ruby-core:43245][Bug #6131]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07 14:10:30 +00:00
shirosaki fc83ebb037 * test/ruby/test_thread.rb
(TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows.
  Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP
  flag is not specified in a call to CreateProcessW().

* win32/win32.c (CreateChild): revert the usage of
  CREATE_NEW_PROCESS_GROUP flag for compatibility.
  [ruby-core:43245][Bug #6131]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07 14:10:25 +00:00
tenderlove 85e4c89675 * ext/psych/parser.c: fall back to any encoding if the external
encoding is wrong.  [ruby-core:44163]
* test/psych/test_encoding.rb: fix test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-06 17:09:03 +00:00
naruse 3f443e6115 Use mount_proc to avoid the delay of writing data to files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-04 12:49:12 +00:00
naruse 223e0212e9 Sleep 0.5sec to wait the file is written on server.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-04 07:58:19 +00:00
naruse 7865005fa1 * lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-04 04:10:58 +00:00
naruse 58a9bf0c4c Don't call f.close if f is nil or already closed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 19:30:10 +00:00
naruse bc2ece6cf8 * lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.
* lib/ftp/ftp.rb (Net::BufferedSocket#shutdown): added.

* test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): wait socket
  with shutdown and read.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 19:24:30 +00:00
nobu d7655cc292 * test/mkmf/base.rb (TestMkmf#setup): remove uninitialized global variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 14:30:08 +00:00
nobu 5c67392c95 * test/mkmf/base.rb (TestMkmf#teardown): remove meaningless assertion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 14:30:05 +00:00
usa 995d212a64 * test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): should wait
a little before closing socket because if the client call
  Net::FTP#getmultiline the socket is suddenly closed by the server in
  the getline loop.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 10:03:30 +00:00
nobu 9102ee7be2 * test/mkmf: remove generated files and ensure nothing left.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 09:41:14 +00:00
naruse 31bd33a662 Revert r35180; the fix break the test. see [ruby-dev:30653]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 04:27:30 +00:00
nobu 63e8110bfc * enumerator.c (inspect_enumerator): suppress uninitialized
instance variable warnings.  [ruby-dev:45449][Bug #6214]
  patched by no6v (Nobuhiro IMAI).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 01:18:31 +00:00
nobu a59bfa76e5 * lib/optparse/ac.rb: autoconf-like options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-02 04:25:14 +00:00
nobu 38b8afcf5a * string.c (rb_str_start_with, rb_str_end_with): raise an error if
an argument is not convertible to a String.
  [ruby-core:40623][Bug #5536]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-02 01:34:11 +00:00
naruse 8630041945 Refix of 35206; 0.3 is too small for Ruby's timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 21:06:13 +00:00
naruse 61fcda16fd ReRefix the test for r35205.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 21:00:54 +00:00
naruse 9d8ca7e15e Refix the test for r35205.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 20:59:02 +00:00
naruse 8520505e44 Fix the test for r35205.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 18:42:22 +00:00
naruse 4179e0b5c6 Client waits only the first line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 14:06:42 +00:00
naruse ae79409db4 * lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @io
for Net::FTP#abort and Net::FTP#status..

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 14:06:38 +00:00
nobu bfdccf09c7 use super in h.default
* test/ruby/test_hash.rb (TestHash#test_shift_none): super in
  singleton default method doesn't cause SystemStackError now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31 08:13:58 +00:00
nobu 160d02d830 * hash.c (hash_default_value): extract from rb_hash_aref(), to be
shared with rb_hash_shift(), so that overriding Hash#default
  will be respected.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31 05:23:01 +00:00
shugo 5f81a53fd2 * lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31 04:44:36 +00:00
nobu d481e34e3c misplaced rescue
* test/ruby/test_thread.rb (test_condvar_wait_deadlock_2): fix cleanup
  code which is never executed because of misplaced rescue.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31 00:48:56 +00:00
nobu becc3000ca descriptive assertions
* test/ruby/test_hash.rb: use more descriptive assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-30 22:18:52 +00:00
nobu fc4e79e301 join LocalBarrier
* test/ruby/lbtest.rb: needs to join the local barrier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-30 22:18:50 +00:00
nobu efd6f6b856 * test/ruby/lbtest.rb: print at once including newlines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-29 15:03:05 +00:00
nobu 30cea65767 * st.c (st_update): add existing parameter to the callback function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-29 07:36:12 +00:00
emboss aad347f5ec * ext/openssl/ossl_pkcs7.c: fix crash when parsing garbage data.
* test/openssl/test_pkcs7.rb: assert correct behavior for it.
  Thanks to Matt Venables for reporting the issue.
  [ruby-core:43250][Bug #6134]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-29 01:27:17 +00:00
emboss 836af4e5dc * test/openssl/test_x509cert.rb: Exclude test that fails when issuing
a certificate with RSA signature and DSS1 digest for earlier
  OpenSSL versions when used in conjunction with OpenSSL 1.0.1.
  Thanks, Vit Ondruch, for reporting the issue.
  [ruby-core:42949][Bug #6089]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-29 00:32:09 +00:00
emboss 5bef1c9223 * ext/openssl/ossl_asn1.c: raise TypeError when trying to encode nil
values for Primitive instances. 
* test/openssl/test_asn1.rb: Assert consistent behavior when
  encoding nil values: Primitives raise TypeError, Constructives
  raise NoMethodError.
  Fixes [ruby-core:43009][Bug #6102]
-This line, and those below, will be ignored--

M    test/openssl/test_asn1.rb
M    ext/openssl/ossl_asn1.c
M    ChangeLog


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-28 22:53:18 +00:00
nobu 9bf9b3ef95 * process.c (obj2uid, obj2gid): allow strings as input user/group id.
[ruby-core:40923][Feature #5610]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-28 07:40:02 +00:00
nobu 1521f9331e * marshal.c (r_symreal): default to ASCII-8BIT for non-ascii symbols,
otherwise it should be converted to US-ASCII in rb_intern_str() if
  possible.  [ruby-core:43762][Bug #6209]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-28 06:06:20 +00:00
nobu ab9c982cc0 * string.c (str_new_empty): should copy also the encoding as an
empty substring.  [ruby-dev:45441][Bug #6206]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-27 04:13:54 +00:00
shugo 422c8baeb9 * lib/net/ftp.rb (parse_pasv_port): refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 14:39:16 +00:00
shugo cae1d532f5 * test/net/ftp/test_ftp.rb: add the test, which was forgotten in the
previous commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 10:52:06 +00:00
shugo b9f67c4149 * enumerator.c (inspect_enumerator): show method arguments of
lazy enumerators correctly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 10:52:02 +00:00