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

24603 Коммитов

Автор SHA1 Сообщение Дата
kosaki b3027d5929 * io.c (rb_ioctl): don't expose our sanity check value to ruby script.
It may change string value meaning if the value is string.
  (e.g. MacOS X has  F_GETPATH ioctl)
* io.c (rb_fcntl): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12 02:27:51 +00:00
kosaki 7e2f0491ce * io.c (ioctl_req_t): Type of req argument of ioctl() depend on platform.
Moreover almost all linux ioctl can't be represented by 32bit integer
  (i.e. MSB is 1). We need wrap ioctl argument type.
[Bug #5429] [ruby-dev:44589]
* io.c (struct ioctl_arg): ditto.
* io.c (rb_ioctl): ditto.
* test/ruby/test_io.rb (test_ioctl_linux): add a testcase for ioctl



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12 02:24:51 +00:00
kosaki fc7bb927a2 * io.c (struct io_cntl_arg): remove io_p member.
* io.c (nogvl_fcntl, do_fcntl, rb_fcntl): separated from ioctl functions.
* io.c (nogvl_io_cntl): remove fcntl depended logic.
* io.c (io_cntl): ditto.
* io.c (rb_io_ctl): ditto.
* io.c (rb_io_ioctl): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12 02:17:41 +00:00
kosaki f13d10a0af * io.c (setup_narg): fix off by one bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12 02:12:19 +00:00
kosaki eec252e2e5 * io.c (+setup_narg): factor out length calculation logic.
* io.c (rb_io_ctl): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12 02:09:56 +00:00
svn 6ed2a4dfb3 * 2011-11-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12 02:06:28 +00:00
kosaki 9d16ad639f * io.c (+ioctl_narg_len) new helper function.
* io.c (rb_io_ctl): don't use ioctl specific length check
  if caller is fcntl.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12 02:06:23 +00:00
akr db48bbdf0b * ext/dbm/extconf.rb: db_prefix is not required now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 14:01:25 +00:00
akr 268f6c3680 * ext/gdbm/gdbm.c (fgdbm_initialize): use GDBM_CLOEXEC if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 12:14:23 +00:00
akr 266d09839b * ext/dbm/extconf.rb: fix dbm_pagfno and dbm_dirfno detection with
Berkeley DB.  Macro definitions needs arguments to detect correctly.
  SIZEOF_DSIZE needs -DDB_DBM_HSEARCH because db.h defines datum type
  only if DB_DBM_HSEARCH is defined. 



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 12:03:51 +00:00
nobu 6cedbce87d * process.c (proc_seteuid): separate an internal wrapper function
from the method implementation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 09:42:02 +00:00
nobu 214fd6ce77 * lib/mkmf.rb (have_library, find_library, have_func): allow
arguments of function to be checked.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 08:21:17 +00:00
nobu 05e7354864 * vm_dump.c (HAVE_BACKTRACE): fallback to 0.
* vm_dump.c (rb_vm_bugreport): show "Other runtime information"
  header only when available.
* vm_dump.c (rb_vm_bugreport): get rid of modifying the content of
  VM directly.
* vm_dump.c (rb_vm_bugreport): check if vm is non-null.
  Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
  Thank you.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 08:09:48 +00:00
kosaki 0d746627af * io.c (pipe_open): Remove fflush(stdin). it's no effect.
Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
  Thank you.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 03:41:13 +00:00
akr 688e1b34a6 add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 03:35:49 +00:00
svn da7cefb0f8 * 2011-11-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-10 23:35:39 +00:00
drbrain 661a936e64 * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): Use symbol keys instead
of string keys to avoid duplicating parameters in
  OpenSSL::SSL:SSLContext#set_params.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-10 23:35:35 +00:00
akr e68f4ac7dc add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-10 11:39:16 +00:00
nobu 6c9a235938 * ext/dbm/extconf.rb: set DB_DBM_HSEARCH macro to check dbm_pagfno and
dbm_dirfno on older Debian.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-10 06:43:46 +00:00
nobu fb1836ab48 * ext/dbm/extconf.rb: check for dsize as LONG_LONG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-10 06:43:44 +00:00
nobu fc5f37f0e1 * lib/mkmf.rb (try_func): ignore empty opts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-10 06:13:37 +00:00
nobu cfe220d8f3 * lib/mkmf.rb (have_library, have_func, have_var, have_header):
add compiler option parameter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-10 06:02:40 +00:00
drbrain a5fc87bd5b * ext/openssl/lib/openssl/ssl.rb (class OpenSSL::SSL::SSLContext):
Document #set_params.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 23:45:39 +00:00
svn b5167b4819 * 2011-11-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 17:10:54 +00:00
kosaki 871c6923dc * thread_pthread.c (gvl_yield): don't prevent concurrent sched_yield().
[Bug #5130] [ruby-core:38647]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 17:10:48 +00:00
nobu c88d35619b * io.c (rb_update_max_fd): fstat(2) can fail with other than
EBADF.  [ruby-dev:44837] [Bug #5593].  Cf.
	  http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 14:23:04 +00:00
nobu 1393e55d09 * io.c (rb_update_max_fd): fstat(2) can fail with other than
EBADF.  [ruby-dev:44837] [Backport #4339].  Cf.
  http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 14:20:27 +00:00
nobu 42b4255d08 * io.c (rb_sysopen): max fd is updated in rb_sysopen_internal()
already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 13:54:33 +00:00
akr 3f289d9237 add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 13:26:06 +00:00
usa 7df246bd79 * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
fixed previous commit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 13:15:12 +00:00
usa 54cb63091d * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
add test for r33685.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 11:08:15 +00:00
ko1 0c215e34df * test/ruby/test_fiber.rb: add tests for r33684 (Fiber#resume).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 10:02:22 +00:00
usa 572e4807e6 * win32/win32.c (unixtime_to_filetime): should check the return value
of localtime().  reported by snowjail at gmail.com.
  [ruby-dev:44838] [Bug #5596]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 07:43:08 +00:00
ko1 9cd8b76e6d * cont.c (rb_fiber_m_transfer, rb_fiber_resume): prohibit using
"resume" after "transfer" method are used.  You should not mix
  "resume" fiber and "transfer" fiber.
  [Bug #5526]
* NEWS: add information about this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 04:26:39 +00:00
nobu b2c44e7af5 * template/Doxyfile.tmpl (INCLUDE_PATH): add srcdir and include.
[ruby-core:40843] [Bug #5597]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 02:40:39 +00:00
naruse b10c3136b0 * thread.c (do_select): fix cast, tv_sec is time_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 02:06:49 +00:00
nobu e120e37577 * configure.in: should not use test -e for portability.
[ruby-core:40841] [Bug #5594]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 01:32:25 +00:00
nobu f9188dea88 property
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 01:32:12 +00:00
tenderlove 4c63e02740 * ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
rationals, etc with reference ids.
* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
* ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers,
  rationals, etc with reference ids.
* test/psych/test_object_references.rb: corresponding tests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 19:54:44 +00:00
svn 7bb2da2e2b * 2011-11-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 17:13:07 +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
nobu 0e4c2ce841 * ext/dbm/dbm.c (fdbm_fetch, fdbm_key, fdbm_delete, fdbm_store)
(fdbm_has_key, fdbm_has_value): get rid of overflow.
* ext/gdbm/gdbm.c (rb_gdbm_fetch2, rb_gdbm_nextkey)
  (rb_gdbm_delete, fgdbm_store, fgdbm_has_key): ditto.
* ext/dbm/dbm.c (fdbm_delete_if): hide intermediate objects.
* ext/gdbm/gdbm.c (fgdbm_delete_if): ditto.
* ext/dbm/extconf.rb: check size of datum.dsize to get rid of
  overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 14:34:39 +00:00
naruse 4342469e8c * addr2line.c (PATH_MAX): define if not defined. [ruby-core:40840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 14:31:56 +00:00
nobu ebe0280253 * ext/tk/tcltklib.c (rb_thread_critical): fix type.
* ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core): int is
  enough for micro seconds.  may need to check overflow in the
  setter though.
* ext/tk/tcltklib.c (RSTRING_LENINT): check overflow if necessary.
* ext/tk/tcltklib.c (RbTk_ALLOC_N): wrapper for ckalloc() which
  takes an int.
* ext/tk/tcltklib.c (ip_ruby_cmd_receiver_get, tcltklib_compile_info):
  get rid overflow.
* ext/tk/tcltklib.c (tcltklib_compile_info): constified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 14:26:51 +00:00
akr ddb9acd9f8 * test/dbm/test_dbm.rb: split tests for read only database.
* test/gdbm/test_gdbm.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 11:51:28 +00:00
akr c2c0707949 * ext/pty/pty.c (MasterDevice): define only when used.
(SlaveDevice): ditto.
  (deviceNo): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 10:04:32 +00:00
nobu 4d36509054 * ext/-test-/old_thread_select/extconf.rb: ignore deprecated
declaration warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 09:02:59 +00:00
nobu 6bb4ddcba5 * include/ruby/ruby.h (rb_long2int): define as a macro always, so
that cpp conditionals can tell if it is provided.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 08:59:28 +00:00
nobu 7c7514b206 * lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp
cannot work.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 08:30:53 +00:00
naruse 452bf3b9c9 * ext/pty/pty.c (get_device_once): FreeBSD 8 supported O_CLOEXEC flag
for posix_openpt, but FreeBSD 9's posix_openpt doesn't support
  O_CLOEXEC and fails if specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 08:26:00 +00:00