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

26304 Коммитов

Автор SHA1 Сообщение Дата
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
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
svn 7c9430921b * 2012-05-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-12 21:46:55 +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
drbrain 83d7576548 Fixed issue number in fileutils changelog entry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 22:10:43 +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
drbrain dfa9522c33 * lib/fileutils.rb (cp_r): Fixed cp_r example. Patch by TJ Koblentz
from pull request #114.  [ruby-trunk - Bug #6410]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 21:02:58 +00:00
naruse 151093b97e * thread.c (rb_threadptr_execute_interrupts_common):
test_signal_requiring of test/ruby/test_signal.rb fail if the sub
  process is killed on waiting IO in lex_io_gets in rb_load_file in
  rb_load_internal in require.
  This is because
  (1) the process receive the killing signal in
      rb_thread_io_blocking_region in rb_read_internal in lex_io_gets.
  (2) set th->errinfo as INT2FIX(TAG_FATAL) at
      rb_threadptr_execute_interrupts_common.
  (3) escape rb_load_file in rb_load_internal and jump to EXEC_TAG()
      without set loaded as TRUE.
  (4) call first rb_exc_raise(GET_THREAD()->errinfo); because loaded
      is FALSE as above. this errinfo should be an exception object
      but this is INT2FIX(TAG_FATAL).
  Don't call first rb_exc_raise if GET_THREAD()->errinfo is Fixnum.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 20:39:35 +00:00
svn 2650c69584 * 2012-05-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 15:24:32 +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
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
nobu 5f58cd0906 lib/test/unit.rb: no unnecessary newlines
* lib/test/unit.rb (Test::Unit::Runner#failed): no unnecessary
  newlines if no reports to be displayed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 00:51:10 +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
svn bc6a32cee6 * 2012-05-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 18:03:10 +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
svn 352010845b * 2012-05-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 01:18:31 +00:00
nobu ae32e9a225 parse.y: debugging stuff
* parse.y (lex_state_name): returns name for lex_state_e, for debug
  use.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10 01:18:27 +00:00
drbrain 2924c95347 Ignore mkmf-generated Makefile
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-09 19:56:56 +00:00
nobu 74134f57b1 lib/mkmf.rb: check pkg-config result
* lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from
  pkg-config works actually.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-09 07:36:03 +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
drbrain 2dece928e0 * re.c (rb_reg_equal): Removed incorrect example for Regexp#== with
"n" option.  [ruby-talk - Bug #6415]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 21:33:31 +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
svn 9fdf9df1b2 * 2012-05-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 19:35:14 +00:00
seki 113b94e145 * lib/rinda/ring.rb (lookup_ring_any): fix Rinda::RingFinger.primary
hungs forever. [ruby-talk:395364]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 19:35:07 +00:00
kazu a089fe010e fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 14:28:36 +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
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
nobu f8599f92e7 configure.in: fix for BSD make
* configure.in (POSTLINK): default to : command to get rid of flag
  only command, since BSD make does not work with it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 04:36:04 +00:00
nobu b4b9183ffc lib/test/unit.rb: remove exact trace
* lib/test/unit.rb (MiniTest#run_test): remove exact trace and get rid
  of IndexError, which could caused by modified $@ sometimes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 04:35:13 +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 779922622b tests: customizable colors
* bootstraptest/runner.rb, lib/test/unit.rb, sample/test.rb:
  customizable colors.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 00:25:47 +00:00
nobu 1af101f8ed lib/test/unit.rb: old behavior if verbose
* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): keep the old
  behavior if --verbose option is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 00:25:43 +00:00
drbrain 79f28211fd * lib/abbrev.rb: Fixed typo in abbrev pattern documentation. Based on
patch by Mark Rushakoff.  [ruby-trunk - #6346]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 23:55:53 +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