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

11 Коммитов

Автор SHA1 Сообщение Дата
normal b3d126d5de rb_wait_for_single_fd: do not OOM or segfault with invalid FD on select()
Instead, match the poll() implementation used on Linux for now;
as the Linux poll(2) manpage describes using negative FD to
easily ignore an FD in a larger FD set while (sleeping the given
timeout).  I'm not entirely sure if matching poll() behavior
is a good idea for a single FD, but it's better than segfaulting
or NoMemoryError.

* thread.c (init_set_fd): ignore negative FD
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb
  (test_wait_for_invalid_fd): check values which may trigger
  segfaults or OOM

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-27 08:26:47 +00:00
nobu a5beed9ff4 ext/-test-: reduce feature names
* ext/-test-/**/extconf.rb: bring up extension libraries which
  have same name as the parent directory to reduce feature names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-10 09:43:47 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
nobu 289d6bb30f test: use assert_raise
* test/ruby, test/-ext-: use assert_raise instead of assert_raises.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 08:41:13 +00:00
kazu 327ea26b59 * ext/bigdecimal/README: Update redmine.ruby-lang.org to bugs.ruby-lang.org
* ext/socket/ancdata.c: ditto
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto
* test/syck/test_yaml.rb: ditto
* doc/ChangeLog-1.9.3: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-20 16:09:17 +00:00
naruse aa432d2334 FreeBSD 9.0 RC3 is now released.
See also r33677, r33967, and r33973.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-14 00:28:26 +00:00
naruse 09c399b68e It is fixed in FreeBSD 9.0 RC3, not RC2.
So skip until it is released.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-07 22:13:04 +00:00
naruse 1b99ecc5a2 FreeBSD 9.0 RC2 fixes the bug.
FreeBSD PR: kern/155606, kern/162379

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-07 00:32:37 +00:00
naruse 3d855def9e FreeBSD 8.2 sticks this [ruby-dev:44726] [Bug #5524]
http://redmine.ruby-lang.org/issues/5524

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 17:13:03 +00:00
kosaki c06da4735d * thread.c (rb_wait_for_single_fd): Fix wrong return value.
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb
(TestWaitForSingleFD#test_wait_for_closed_pipe): test for it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-04 10:02:06 +00:00
kosaki 2a989121db * ext/-test-/wait_for_single_fd: New. for testing
rb_wait_for_single_fd() internal function.
  The patch was written by Eric Wong. [ruby-core:35991]

* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-04 09:50:27 +00:00