no longer an alias of pthread_cond_t.
* thread_pthread.c: adapt new rb_thread_cond_t type.
* thread.c (mutex_alloc): ditto.
* thread_win32.c (native_cond_initialize): ditto.
* configure.in: add check for pthread_cond_attr_setclock() and
clockid_t type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
if possible. based on a patch from Eric Wong. [ruby-core:36003].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
check with LONG_MAX and cast as long; without this the calculation
will be done as int and overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
silently ignoring lesser significant digits. Required buffer
length can be computable so you might at first think of
allocating enough memory space on the fly using alloca(). That
is a wrong idea because when using alloca there is always risk
of integer overflow. A function that accepts outer-process
resources like this should not blindly trust its inputs. In
this particular case we just want to generate miliseconds
resolution by strtod() so the string in question needs no more
length than what we originally have. Ignoring lesser
significant digits should suffice I believe.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
cfp->me because method_entry_of_iseq() might become expensive.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
methods defined by Module#define_method with a same block.
[ruby-core:35386] fixes#4606
* eval (method_entry_of_iseq): new helper function. search control
frame stack for a method entry which has given iseq.
* test/ruby/test_method.rb: add tests for #4696
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_io.rb (TestIO#test_o_cloexec): test for File::CLOEXEC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
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
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531]
* ext/socket/init.c (try_wait_connectable, wait_connectable_ensure):
removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Now only Linux uses it.
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (select_single): select(2) based backend for rb_wait_for_single_fd().
* io.c (make_writeconv): use rb_wait_for_single_fd() instaed of
rb_thread_fd_select().
* io.c (rb_io_wait_readable): ditto.
* thread.c (rb_thread_wait_fd_rw): ditto.
* io.c (wait_readable): removed.
* thread.c (init_set_fd): new helper function.
* include/ruby/io.h (RB_WAITFD_IN, RB_WAITFD_PRI, RB_WAITFD_OUT):
new constant for rb_single_wait_fd().
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Skip sticky bit test if the platform is FreeBSD. It doesn't allow to
change sticky bit if a target is regular file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The patch was written by takkanm. [ruby-core:26029][Feature #2190]
* lib/fileutils.rb (FileUtils#fu_mode): new helper function.
* lib/fileutils.rb (FileUtils#symbolic_modes_to_i): ditto.
* lib/fileutils.rb (FileUtils#mode_mask): ditto.
* lib/fileutils.rb (FileUtils#user_mask): ditto.
* test/fileutils/test_fileutils.rb (TestFileUtils#test_chmod_symbol_mode):
new test for the above symbolic mode.
* test/fileutils/test_fileutils.rb (TestFileUtils#test_chmod_R): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e