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

40177 Коммитов

Автор SHA1 Сообщение Дата
ngoto 66a36e9b13 * test/ruby/test_process.rb (test_exec_close_reserved_fd): test for
[Bug #11353]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 16:39:25 +00:00
svn 80025e956b * 2015-07-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 15:39:50 +00:00
kazu 19c41354c5 * .gitignore: ignore version.i. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 15:39:34 +00:00
ngoto 7a1413a768 * test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):
use RUBY (= EnvUtil.rubybin)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 14:44:06 +00:00
ngoto d1bce9ec55 * process.c (redirect_close, parent_redirect_close): should not close
reserved FD. It should be closed in the exec system call due to the
  O_CLOEXEC or FD_CLOEXEC flag. [Bug #11353] [ruby-core:69977]
    
* process.c (close_unless_reserved): new function to close FD unless
  it is reserved for internal communication.
      
* thread_pthread.c (rb_reserved_fd_p): should check owner_process pid
  to avoid false positive in forked child process.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 14:26:22 +00:00
kazu ae406d9e09 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 13:27:58 +00:00
normal dab4d077d1 remove redundant NULL checks after RUBY_VM_IFUNC_P
* proc.c (proc_mark): remove redundant check
* vm.c (env_mark): ditto

This doesn't change object code size, but the unstripped
executable is smaller and the code less confusing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 09:32:08 +00:00
normal a0908cb413 remove redundant NULL check in mark functions
gc.c (gc_mark_children)only calls mark_func if the T_DATA ptr is
non-NULL, so avoid redundantly checking for that in each
mark function.

* iseq.c (iseq_mark): remove check for data pointer
* proc.c (binding_mark): ditto
* vm.c (rb_thread_mark): ditto
* vm_trace.c (tp_mark): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 08:29:22 +00:00
nobu 28c42b4c25 encoding.c: drop dummy encoding flag
* encoding.c (enc_autoload): drop dummy encoding flag from
  the loaded encoding index.  this flag is used only in this
  source.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 07:55:08 +00:00
ko1 e262b29ed0 * vm.c (vm_make_env_each): add comments about env layout.
Do not use `i' to specify `new_ep'.
* vm.c (rb_proc_create, rb_vm_make_proc_lambda): envval is not used.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 05:43:07 +00:00
nobu daf7b1e479 -test-/string: move
* ext/-test-/string/extconf.rb: move "-test-/string/string.so" to
  "-test-/string.so".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 03:56:17 +00:00
nobu 4592e15e35 string.c: remove redundant calls
* string.c (rb_str_enumerate_bytes, rb_str_enumerate_codepoints):
  do not check if a block is given twice.  RETURN_SIZED_ENUMERATOR
  includes rb_block_given_p() check which is redundant here.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-15 01:29:37 +00:00
nobu bb8abf62d3 gc.h: evaluate the macro argument only once
* gc.h (RUBY_MARK_UNLESS_NULL): evaluate the argument only once
  to get rid of inadvertent side effects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 23:59:23 +00:00
ko1 994460c4db * vm_core.h, vm.c: remove rb_proc_t::envval because we can know it via
rb_proc_t::block::ep.
  rb_vm_proc_envval(const rb_proc_t *proc) returns an Env object which
  the Proc object use.
* proc.c: catch up this fix.
* vm_dump.c (rb_vmdebug_proc_dump_raw): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 17:59:03 +00:00
ko1 e07dad00ee * vm_core.h, vm.c: remvoe rb_env_t::prev_envval because we can know it
via env->ep.
  rb_vm_env_prev_envval(env) returns prev_envval via env->ep.
* vm_core.h (rb_vm_env_local_variables): change parameter type
  from VALUE (T_DATA/env) to `const rb_env_t *' to make same as
  rb_vm_env_prev_envval().
* proc.c: catch up these changes.
* vm_dump.c: ditto.
* vm.c: rename macros.
  * ENV_IN_HEAP_P() to VM_EP_IN_HEAP_P() because it uses ep.
  * ENV_VAL() to VM_ENV_EP_ENVVAL() because it is too short.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 17:36:36 +00:00
svn af4cbc4fe0 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 16:26:10 +00:00
ko1 a82ce7c556 * vm.c: refactoring Proc/Env related code.
* vm_core.h: remove blockprocval field from rb_proc_t and rb_binding_t.
  Instead of this field, mark given block in Proc at rb_env_t::env.
* vm.c (vm_make_env_each): make an Env object with this layout.
  And also simplify parameters.
* proc.c: catch up this fix.
* vm_core.h: remove rb_env_t::local_size because it is not used.
* vm_dump.c (rb_vmdebug_env_dump_raw): catch up this fix.
* vm_core.h (rb_vm_make_env_object): remove rb_vm_make_env_object()
  because it is only refered from vm.c.
* vm_eval.c (eval_string_with_cref): catch up this fix.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 16:23:17 +00:00
kazu 50ae750646 use _Static_assert with clang
* gc.c (__has_feature): move into internal.h.

* internal.h (__has_feature): ditto.

* internal.h (__has_extension): new macro.

* internal.h (STATIC_ASSERT): use _Static_assert with
  clang. [ruby-core:69931] [Bug #11343]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 15:09:23 +00:00
svn 0641e1fc0e * 2015-07-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 15:01:57 +00:00
kazu b091903c5c fix compile error with clang
* random.c (fill_random_bytes_syscall): fix compile error with
  clang. [ruby-core:69931] [Bug #11343]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 15:01:39 +00:00
nobu 4ba1038af3 rtname.cmd: extract at once
* win32/rtname.cmd: extract runtime DLL names at once, and other
  refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 08:13:18 +00:00
nobu f77967ad73 test_filehandler.rb: fix UNC path failure
* test/webrick/test_filehandler.rb (test_short_filename): pass
  document root path to cmd.exe instead of chdir there, as cmd.exe
  does not start on UNC path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 04:55:13 +00:00
nobu 1c4fe8df9f webrick/test_utils.rb: no timeout during assertion
* test/webrick/test_utils.rb (assert_expired): separate negated
  assertion and block timeout excecptions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 04:55:03 +00:00
nobu cb04140542 timeout.rb: suppress a warning
* lib/timeout.rb (Timeout): get rid of an argument prefix warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 02:34:53 +00:00
nobu 7d909eb218 webrick/utils.rb: wakeup immediately
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#register):
  notify the handler thread of new timeout registration.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 02:22:51 +00:00
nobu 8f6fed850a webrick/utils.rb: adaptive sleep
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#initialize):
  make sleep intervals adaptive than fixed period intervals.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 02:21:53 +00:00
svn 5227d61ebf * 2015-07-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 02:20:39 +00:00
nobu 18d47904a4 test_utils.rb: split
* test/webrick/test_utils.rb (TestWEBrickUtils#do_tet_timeout):
  split into tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 02:20:34 +00:00
nobu 77cde58d39 webrick/server.rb: stop immediately
* lib/webrick/server.rb (WEBrick::GenericServer#start): flush
  shutdown pipe.
* lib/webrick/server.rb (WEBrick::GenericServer#stop): request the
  server to stop immediately by sending data via shutdown pipe.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 02:20:16 +00:00
nobu f162f2073b httpproxy.rb: fix typos [ci skip]
* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#do_CONNECT):
  fix typos in debugger statements.  [Fix GH-967]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13 14:58:12 +00:00
kazu f40138c513 fix indent (tabify) [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13 14:46:02 +00:00
kazu 32daf56855 fix indent (tabify) [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13 14:45:43 +00:00
nobu f8fb526ad9 remove needless volatile
* array.c (rb_ary_each): remove needless volatile for outdated
  clang 3.0.  revert r32201.

* cont.c (cont_capture): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13 10:52:11 +00:00
nobu fa474e56cd timeout.rb: warn deprecated method
* lib/timeout.rb (timeout): warn as deprecated for a long time.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13 10:11:38 +00:00
nobu beb1c085d5 use Timeout.timeout
* time: Object#timeout has been deprecated a long time ago, use
  Timeout.timeout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13 10:07:01 +00:00
nobu 42f1ff1272 timeout.rb: internal constants
* lib/timeout.rb (Timeout): make internal constants private.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13 04:50:20 +00:00
svn d7de6e77b6 * 2015-07-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-12 16:41:51 +00:00
zzak 385c0f1028 * ext/openssl/ossl.c: [DOC] Backport ruby/openssl@dbb3fdb [Bug #11345]
Thanks to Tomoya Chiba for the report and help with patch.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-12 16:41:32 +00:00
sorah 3876d75585 * ext/socket/basicsocket.c: [DOC] typo (Errno::AGAIN -> Errno::EAGAIN)
* ext/socket/socket.c: ditto

* ext/socket/tcpserver.c: ditto

* ext/socket/udpsocket.c: ditto

* ext/socket/unixserver.c: ditto

* io.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-12 00:21:32 +00:00
svn 370cadcced * 2015-07-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-11 21:43:05 +00:00
nobu a3d6de4adc Simple testing for StringIO#sysread
* test/stringio/test_stringio.rb (test_sysread): add a test for
  StringIO#sysread.  [Fix GH-966]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-11 21:42:27 +00:00
nobu 8c0b261d48 stringio.c: Fix an example doc [ci skip]
* ext/stringio/stringio.c (Init_stringio): [DOC] Fix an example,
  StringIO#puts should be set "\n" at last.  [Fix GH-965]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-11 12:16:37 +00:00
usa e7d6fc01dd * ChangeLog: typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-11 03:55:46 +00:00
nobu a2b889f4ab timeout.rb: fix backtrace
* lib/timeout.rb (Timeout#timeout): remove regexp with wrong line
  nuber and fix caller depth.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-11 03:45:54 +00:00
svn 0d70cc5ce7 * 2015-07-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10 23:48:11 +00:00
nobu 8d7058db47 test_timeout.rb: add an assertion
* test/test_timeout.rb (test_custom_exception): assert that the
  given exception will raise on timeout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10 23:47:55 +00:00
nobu 0f663b2449 timeout.rb: removed and use Timeout::Error
* lib/timeout.rb (ExitException): removed internal exception class
  and use Timeout::Error instead, as using throw/catch to isolate
  each timeouts now.  [ruby-dev:49179] [Bug #11344]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10 13:05:53 +00:00
nobu 498b6f4776 zlib.c: GC guards
* ext/zlib/zlib.c: prevent from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10 12:50:26 +00:00
nobu 41bd073de2 zlib.c: protoize
* ext/zlib/zlib.c (do_checksum): protoize the definition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10 12:49:58 +00:00
nobu d85096ad45 compressed mantypes
* configure.in (--with-mantype): add compressed mantypes.

* tool/rbinstall.rb (man): compress man pages if specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10 12:49:55 +00:00