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

4595 Коммитов

Автор SHA1 Сообщение Дата
nobu 80bd769f18 test/ruby/test_time.rb: split a big test
* test/ruby/test_time.rb (TestTime#test_strftime): split a big test by
  subjects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 23:36:00 +00:00
tadf 00fd38644d * ext/date/date_strftime.c: should also be aware of flags on
complex specifier.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 22:03:37 +00:00
tenderlove b4bdb2f2eb * ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string
subclass dumping and loading.

* test/psych/test_array.rb: pertinent tests

* test/psych/test_string.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 20:13:21 +00:00
tenderlove 5341e3ccc4 * ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps to
Psych::Omap objects rather than hashes. [Bug #6425]

* test/psych/test_omap.rb: pertinent test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 16:34:21 +00:00
nobu b32388d5f8 test for Bug #6385
* test/ruby/test_file.rb (TestFile#test_utime): test for [Bug #6385].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 14:54:15 +00:00
nobu 0d9608eb3c test/ruby/test_file.rb: use tmpdir
* test/ruby/test_file.rb (TestFile#test_utime): Dir.mktmpdir does not
  chdir.

* test/ruby/test_file.rb (TestFile#test_file_open_permissions): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 14:54:12 +00:00
nobu 498a001fa7 test/ruby/test_marshal.rb: close pipes
* test/ruby/test_marshal.rb (TestMarshal#test_pipe): should close pipes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 14:54:09 +00:00
naruse 3e972bbaba Check IFDISABLED on Mac OS X.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-14 07:46:02 +00:00
nobu 45f6cdcdd3 Bug #6403: reset states after empty args
* parse.y (f_arglist): should reset lexical states after empty
  argument list with no parenthesis as well as parenthesized list,
  so that reserved name method definition work.  [ruby-dev:45626]
  [Bug #6403]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-14 07:28:36 +00:00
nagachika 4007da1792 * enumerator.c (lazy_take_func, lazy_take): multiple calls of
force/to_a method to Enumerator::Lazy#take should return same
  results. [ruby-dev:45634] [Bug #6428]

* test/ruby/test_lazy_enumerator.rb (test_take_recycle): add test for
  above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 15:24:40 +00:00
nagachika 526a853d6d * test/ruby/test_io.rb (test_flush_in_finalizer1): don't use IO.for_fd
to close IO objects. it create IO object with already closed fd, and
  cause occasional Errno::EBADF in following tests. [ruby-core:45020]
  [Bug #6228]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 14:50:49 +00:00
nagachika 806018e8f4 * test/ruby/test_io.rb (TestIO): revert r35631. it broke the intent of
test_flush_in_finalizer1.  [ruby-core:43951] [Bug ##6228]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 14:47:29 +00:00
luislavena 32ef61144b * test/ruby/test_io.rb (class TestIO): Disable GC during IO tests to
avoid file descriptors being GC'ed. Suggestion by Tomoyuki Chikanaga
  [ruby-core:43951][Bug #6228]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-12 21:46:51 +00:00
naruse cc08e95b20 Revert r35622.
It breaks bootstraptest/test_exception.rb:388.

"* thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 15:24:27 +00:00
naruse 38d3b013b7 * thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is
not Fixnum, but exception object.
  This causes test_signal_requiring of test/ruby/test_signal.rb fail
  if the sub process is killed on waiting IO in lex_io_gets in require
  itself, not sleep.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 14:03:40 +00:00
naruse 2f56c64b4f Add a test: BigDecimal("0").div(BigDecimal("Infinity")).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 14:03:38 +00:00
nobu 4bbb0f9801 Bug #6419: fix cmdarg begin
* parse.y (primary): begin/end block should be isolated from outside.
  [ruby-dev:45631][Bug #6419]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 05:23:14 +00:00
tenderlove 64c73b501b adding a few tests surrounding file open arguments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 18:03:06 +00:00
naruse bfbf9d0956 fix the path of ifconfig.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 12:37:56 +00:00
naruse ba8a74314e skip addresses whose interface is set as POINTOPOINT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 08:29:33 +00:00
naruse 08b3a446e5 Skip IPv6 addresses whose interface is set as IFDISABLED.
FreeBSD 9.0 with default setting (ipv6_activate_all_interfaces
is not YES) sets IFDISABLED to interfaces which don't have
global IPv6 address.
Link-local IPv6 addresses on those interfaces don't work.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 03:47:10 +00:00
nobu 989f5a1e6f test/minitest: Correct requiring path to metametameta.rb.
* test/minitest/test_minitest_mock.rb: Correct requiring path to
  metametameta.rb.
* test/minitest/test_minitest_unit.rb: Correct requiring path to
  metametameta.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 01:55:38 +00:00
shugo 2e63cd97c1 * lib/net/imap.rb (decode_utf7, encode_utf7): refactored by
Nobuyoshi Nakada, to use String#encode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-09 07:03:19 +00:00
nobu e62c35fb8f * test/rubygems/test_gem_remote_fetcher.rb: skip OpenSSL dependent
tests if not available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-09 04:26:29 +00:00
ryan a213c2ed9c Imported minitest 3.0.0 (r7435) w/ fixes for rubygems. 10955 tests, 2253343 assertions, 1 failures, 1 errors, 28 skips minus drb tests on x86_64-darwin11.3.0 and reviewed by drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-09 04:09:25 +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
shirosaki 7e134cf71e * io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
If the end of reading buffer is CR, io_unread() needs to unread one
  more byte.
  [ruby-core:44874] [Bug #6401]

* test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
  add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 12:01:05 +00:00
nobu c45d780b83 test/mkmf/base.rb: hide compiler output
* test/mkmf/base.rb (TestMkmf::Capture#reopen): reopen replaced IO
  too, to hide compiler output.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 06:50:05 +00:00
nobu 63a164f32e test: fix test conditions
* test/csv/test_features.rb (TestCSV#test_gzip_reader_bug_fix): test
  only if zlib is available.

* test/csv/test_features.rb (TestCSV#test_gzip_writer_bug_fix): ditto.

* test/open-uri/test_open-uri.rb (TestOpenURI#test_content_encoding):
  ditto.

* test/rexml/test_order.rb (OrderTester#test_more_ordering): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 06:50:03 +00:00
nobu a0d2cd2e1e test: why believe source directories are writable always?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 06:49:59 +00:00
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