io_flush_buffer_async.
* io.c (io_flush_buffer_async2): new helper function for
io_flush_buffer. It uses rb_thread_call_without_gvl2() instead
of rb_thread_io_blocking_region.
* io.c (io_flush_buffer_sync2): new helper function for
io_flush_buffer_async2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
when EINTR. EINTR mean signal interrupt was happen. We don't
need any wait.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_thread_timer_and_interrupt, test_thread_join_in_trap,
test_thread_join_current, test_thread_join_main_thread,
test_main_thread_status_at_exit, test_thread_status_in_trap,
test_thread_status_raise_after_kill, test_mutex_owned,
test_mutex_owned2): move these tests from TestThreadGroup class
to TestThread becuase they are not thread group tests.
* test/ruby/test_thread.rb (test_thread_status_raise_after_kill):
add t.join.
* test/ruby/test_threadgroup.rb: new file. moved ThreadGroup test
form test_thread.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
th.abort_on_exception change. Test template shouldn't change
global flag. It prevent to test a normal case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_thread_polling(). When getting EAGAIN, we need to wait a
while even if no multi threading.
* thread.c (sleep_for_polling, rb_thread_polling) removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
has no good effect and makes meaningless 100ms delay. 1)
when sending signal to another process, waiting has just silly.
2) when sending signal to current process, 100ms is often not
enough time to wait. It depend on kernel behavior. And,
rb_thread_polling() doesn't make sense anyway. When rb_thread_alone()
is true, it doesn't wait at all and Process.kill() users don't
expect threading changes Process.kill() behavior. [Bug #7560]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_params): parser_tokline to track the line number at
which token started. [ruby-dev:46737] [Bug #7559]
* parse.y (fcall): operation with starting line number.
* parse.y (command, primary, method_call): point method name line.
* parse.y (gettable_gen): return token line for __LINE__.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_params): parser_tokline to track the line number at
which token started. [ruby-dev:46737] [Bug #7559]
* parse.y (fcall): operation with starting line number.
* parse.y (command, primary, method_call): point method name line.
* parse.y (gettable_gen): return token line for __LINE__.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
in r38365.
* vm_insnhelper.c (vm_call_method): use __forceinline to prevent
VC to make vm_call_general and vm_call_super_method as the same
method. Thanks, Heesob Park. [Bug #7556] [ruby-core:50867]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
take file and line by using caller_locations if not given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
On test-all with -j, it may crash in TH_POP_TAG.
Detailed mechanism is not known but this fixes it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
These speed will slow down when there are many objects like test-all.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
added to execute given test source on separate process,
catch its resulted exception and raise it on main process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
with non-word characters. Thanks Alex Tambellini!
* test/psych/test_yaml.rb: appropriate test case
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
failure of TestRefinement#test_refine_recursion in Windows.
See [ruby-core:50871] for details.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c (rb_class_init_copy): rename to class_init_copy_check, performs type
checks on arguments to prevent reinitialization of initialized class
[ruby-core:50869] [Bug #7557]
* class.c (rb_mod_init_copy): use class_init_copy_check if receiver is T_CLASS
* test/ruby/test_class.rb (class TestClass): related test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
modules from C.
* test/rdoc/test_rdoc_class_module.rb: Test for the above.
* lib/rdoc/parser/c.rb: Reload C variable names to allow proper
updates of an ri store for C files.
* lib/rdoc/rdoc.rb: ditto.
* lib/rdoc/store.rb: ditto.
* test/rdoc/test_rdoc_parser_c.rb: Test for the above.
* test/rdoc/test_rdoc_store.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Marshal.load just return the dumped classes and modules.
[Bug #7325] [ruby-core:49198]
* test/ruby/test_marshal.rb: related test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c (umethod_bind): allow another form of method transplanting
from a module via UnboundMethod. [ruby-core:34267][Feature #4254]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
warnings for unused variables.
* ext/bigdecimal/bigdecimal.c (ENTER): use RB_UNUSED_VAR() to
suppress annoying warnings by -Wunused-but-set-variable in gcc 4.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_method_type_t is not a number and "_MAX" causes misunderstanding.
* proc.c (rb_method_entry_arity): ditto.
* vm_eval.c (vm_call0_body): ditto.
* vm_insnhelper.c (vm_call_method): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e