* error.c (name_err_mesg_to_str, syserr_initialize): use VALUE to
format messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
set content-length to zero on empty post requests
by Gregory Ostermayr <gregory.ostermayr@gmail.com>
https://github.com/ruby/ruby/pull/201 fix GH-201
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
from Thread.async_interrupt_timing to Thread.handle_interrupt,
from Thread.async_interrupted? to Thread.pending_interrupt?.
Also rename option from `defer' to `never'.
[ruby-core:51074] [ruby-trunk - Feature #6762]
* vm_core.c, thread.c: rename functions and data structure
`async_errinfo' to `pending_interrupt'.
* thread.c: add global variables sym_immediate, sym_on_blocking and
sym_never.
* cont.c, process.c, vm.c, signal.c: ditto.
* lib/sync.rb, lib/thread.rb: catch up this renaming.
* test/ruby/test_thread.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/profiler.rb (Profiler__::PROFILE_PROC, print_profile): store
profile data per threads for concurrent-execution.
[ruby-core:22046] [Bug #1152]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/profiler.rb (Profiler__::Wrapper): support calling singleton
methods of an instance of BasicObject.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c (rb_check_funcall_with_hook): rb_check_funcall with hook
which is called before calling method_missing or target method.
* marshal.c (w_object, r_object0): use rb_check_funcall_with_hook
instead of respond_to? and call.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (BLOCKING_REGION): if fail_if_interrupted is false ignore
the result of blocking_region_begin(), since it always is true in
that case. suppress "uninitialized" warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (ext/dl/callback/callback.c): include in srcs-ext for
snapshot.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
outer local variable' from example and make obvious ARGV with
non-option arguments.
Patch by Marcus Stollsteimer [ruby-core:47460] [Bug #6997]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_num_coerce_bit.
* numeric.c (rb_num_coerce_bit): the new coerce function for bitwise
binary operation.
* bignum.c (rb_big_and): use coerce to convert the argument, which isn't
a Fixnum nor a Bignum, to the corresponding Integer object so that
bitwise operations can support Integer-mimic objects.
[Bug #1792] [ruby-core:39491]
* bignum.c (rb_big_or): ditto.
* bignum.c (rb_big_xor): ditto.
* numeric.c (bit_coerce): ditto.
* numeric.c (fix_and): ditto.
* numeric.c (fix_or): ditto.
* numeric.c (fix_xor): ditto.
* test/ruby/test_integer.rb: add tests for the above changes.
* test/ruby/test_bignum.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
enqueue error into async_errinfo_queue, because you cannot call
TH_TAG_JUMP() in this function. [ruby-dev:45218] [Bug #5993]
* thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL)
can be popped from async_errinfo_queue.
* vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441.
rb_vm_make_jump_tag_but_local_jump() shouldn't return exception
in case of state == TAG_FATAL.
* test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate
Thread.exit should terminate current Thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This follows the change r38493.
* gc.c (id2ref): fix for working fine with Bignum object id on x64
Windows.
* gc.c (wmap_finalize): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
have junk name like "foo\000".
* test/ruby/test_struct.rb: Test for above.
[Bug #7575] [ruby-dev:46750]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
class methods to IRB::Inspector [ruby-core:51067][Bug #7598]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
based on a patch by Heesob Park at [ruby-core:51060].
cf. [Backport #7454]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
CPtr -> Pointer.
* test/fiddle/test_c_struct_entry.rb
(Fiddle::TestCStructEntity#test_aref_pointer):
Added the test for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
CPtr -> Pointer.
* test/fiddle/test_c_struct_entry.rb
(Fiddle::TestCStructEntity#test_aref_pointer_array):
Added the test for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
CPtr -> Pointer.
* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
Added the test for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e