for preventing thr.raise.
* test/ruby/test_thread.rb (test_main_thread_status_at_exit):
test for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is a main thread.
* test/ruby/test_thread.rb (test_thread_join_main_thread):
test for the above.
* NEWS: news for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is a current thread.
* test/ruby/test_thread.rb (test_thread_join_current):
test for the above.
* NEWS: news for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to Fiddle::Handle.
* ext/fiddle/pointer.c: Make Fiddle independent of DL, copy
DL::Pointer to Fiddle::Pointer.
* test/fiddle/test_func.rb: relevent tests
* test/fiddle/test_handle.rb: ditto
* test/fiddle/test_pointer.rb: ditto
* ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available
* ext/fiddle/extconf.rb: check for dlfcn.h
* ext/fiddle/fiddle.c: add constants for sizeof() things
* ext/fiddle/fiddle.h: include dlfcn.h
* ext/fiddle/function.c: expose a C function for creating new
Fiddle::Function objects.
* ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat
* ext/fiddle/lib/fiddle/function.rb: read the pointer from the
function for dl backwards compat.
* test/dl/test_callback.rb: check the addresses of the pointers rather
than their types.
* test/fiddle/helper.rb: remove dependency on dl
* test/fiddle/test_closure.rb: ditto
* test/fiddle/test_fiddle.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/extmk.rb (extmake): close mkmf.log for each libraries so that
failure messages are not mixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to TracePoint#path and TracePoint#lineno respectively.
They are consistent to RubyVM::Backtrace::Location.
* include/ruby/debug.h: ditto.
* vm_core.h: ditto.
* test/ruby/test_settracefunc.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
again when Ctrl-C was pressed. [Feature #1952] [ruby-dev:39107]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* `klass_solved' represents klass and id is checked.
* `line' represents line calculated from cfp.
* `file' represents line calculated from cfp.
* vm_trace.c: fix to use above data stractures.
No need to calculate klass and id, line and file
pairs for each trace points.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Otherwise the loop in this function behave as busy loop because
native_sleep() return immediately when RUBY_VM_INTERRUPTED() is true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
raises ThreadError if called from trap handler as Thread#join.
* NEWS: news fot the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
of rb_thread_schedule(). Otherwise, it consume 100% cpu meaninglessly.
[Bug #5368] [ruby-dev:44546]
* thread.c (thread_start_func_2): last sub-thread wakes up main thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
binary, shouldn't pass via text mode. use base64 encoded data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
threads.
This benchmark seems consuming long time on travis-ci
several times (and make `failure').
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
You don't need to use `;' separation character.
[ruby-core:50139] [ruby-trunk - Bug #7380]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(rb_str_enumerate_lines): suppress "may be used uninitialized in
this function" warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
running trap handler.
* signal.c (signal_exec): turn on in_trap when running trap.
* thread.c (Init_Thread, thread_create_core): initialize in_trap
when creating new threads.
* thread.c (thread_join_m): raise ThreadError when running trap
handler.Bug [#6416][ruby-core:44956]
* test/ruby/test_thread.rb (test_thread_join_in_trap): new test
for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
interrupted by signal. Otherwise, ruby script may see a garbage
value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
preventing that Process.getsid(io.pid) makes Errno::ESRCH.
(refix r37844)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
child process in child process. because parent process call
Process.getsid with io.pid, Errno::ESRCH could be raised.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_each_line, rb_str_lines): String#lines now
returns an array instead of an enumerator. Passing a block is
deprecated but still supported for backwards compatibility.
Based on the patch by yhara. [Feature #6670]
* string.c (rb_str_each_char, rb_str_chars): Ditto for
String#chars.
* string.c (rb_str_each_codepoint, rb_str_codepoints): Ditto for
String#codepoints.
* string.c (rb_str_each_byte, rb_str_bytes): Ditto for
String#bytes.
* NEWS: Add notes for the above changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e