Commit graph

4169 commits

Author SHA1 Message Date
nagachika
aadf98f11f merge revision(s) 44198: [Backport #9236]
* proc.c (mnew_from_me): method by respond_to_missing? should be
	  owned by the original class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23 13:57:30 +00:00
nagachika
f0f3821be7 merge revision(s) 44175,44179: [Backport #9236]
* proc.c (method_owner): return the class where alias is defined, not
	  the class original method is defined.

	* vm_method.c (rb_method_entry_make, rb_alias): store the originally
	  defined class in me.  [Bug #7993] [Bug #7842] [Bug #9236]

	* vm_method.c (rb_method_entry_get_without_cache): cache included
	  module but not iclass.

	* proc.c (mnew_from_me): achieve the original defined_class from
	  prepended iclass, to fix inherited owner.

	* proc.c (method_owner): return the defined class, but not the
	  class which the method object is created from.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 14:33:11 +00:00
nagachika
86d9d122be merge revision(s) 44127: [Backport #9238]
* insns.def: Fix optimization bug of Float#/ [Bug #9238]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 15:17:42 +00:00
nagachika
787a90cdc5 merge revision(s) 43685,43690,43705: [Backport #9110]
* eval_jump.c (rb_exec_end_proc): fix double free or corruption error
	  when reentering by callcc. [ruby-core:58329] [Bug #9110]

	* test/ruby/test_beginendblock.rb: test for above.

	* eval_jump.c (rb_exec_end_proc): unlink and free procs data before
	  calling for each procs.  [Bug #9110]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 14:51:01 +00:00
nagachika
2f4529e7a6 merge revision(s) 44312,44318,44321: [Backport #9273]
* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not
	  consider encodings in hosts file.  [ruby-core:59239] [Bug #9273]

	* lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 14:09:53 +00:00
nagachika
8058fde22f merge revision(s) 44307: [Backport #9199] [Backport #9272]
* win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
	  install win32.h.
	  [ruby-core:58801][Bug #9199] reported by arton.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 13:52:14 +00:00
nagachika
895a8da09f merge revision(s) 44000: [Backport #9205]
test_gc.rb: shorten

	* test/ruby/test_gc.rb (test_sweep_in_finalizer): omit iteration number to 2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 13:49:33 +00:00
nagachika
206a287917 merge revision(s) 43994: [Backport #9205]
* gc.c (finalize_deferred): flush all deferred finalizers while other
	  finalizers can get ready to run newly by lazy sweep.
	  [ruby-core:58833] [Bug #9205]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 07:38:21 +00:00
nagachika
a46136856c merge revision(s) 43996:
* ruby_atomic.h (ATOMIC_PTR_EXCHANGE): atomic exchange function for
	  a generic pointer.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 07:16:18 +00:00
nagachika
32716d474e merge revision(s) 43851,43882,43883,43995:
* ruby_atomic.h: use __atomic builtin functions supported by GCC.
	  __sync family are legacy functions now and it is recommended
	  that new code use the __atomic functions.
	  http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html

	* configure.in: check existence of __atomic functions.

	* ruby_atomic.h: define ATOMIC_SIZE_CAS() with
	  __atomic_compare_exchange_n() and refactoring.

	* ruby_atomic.h: remove duplicate definisions between ATOMIC_XXX
	  and ATOMIC_SIZE_XXX.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 07:02:57 +00:00
nagachika
34b8c43077 merge revision(s) 41759,41760,43356,43460,43677:
* ruby_atomic.h (ATOMIC_CAS): suppress C4022 and C4047 warnings in
	  VC6.  only InterlockedCompareExchange is declared using PVOID.

	* ruby_atomic.h (rb_w32_atomic_cas): call InterlockedCompareExchange
	  directly.

	* ruby_atomic.h (ATOMIC_CAS): fix missing function call.

	* ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.

	* ruby_atomic.h (ATOMIC_SIZE_CAS): fix compile error on Solaris
	  since r43460.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 06:47:16 +00:00
nagachika
2cd83035a8 merge revision(s) 43669,43672,43678: [Backport #8958]
* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
	  +precision+ argument for Rational#to_d [Bug #8958]

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
	  Rational#to_d without argument. [Bug #8958]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 05:55:08 +00:00
nagachika
ef61d714f3 merge revision(s) 44086,44126: [Backport #9221]
* ext/date/date_parse.c (parse_time): unset case-insensitive flag
	  for [:alpha:], which already implies both cases, to get rid of
	  backtrack explosion.  [ruby-core:58876] [Bug #9221]

	* ext/date/date_strptime.c (date__strptime_internal): unset
	  case-insensitive flag for [:alpha:], which already implies both
	  cases, to get rid of backtrack explosion.  [ruby-core:58984]
	  [Bug #9221]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 18:48:49 +00:00
nagachika
11fe8c9715 merge revision(s) 41427:
test_pty.rb: reap zombie

	* test/test_pty.rb (test_cloexec): reap zombie than leaving to
  detaching thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 15:33:11 +00:00
nagachika
de13975790 merge revision(s) 39722: [Backport #9178]
* enumerator.c (enumerator_with_index): try to convert given offset to
	  integer. fix bug introduced in r39594.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 16:02:08 +00:00
nagachika
c27bd84806 merge revision(s) 43929: [Backport #9178]
* enumerator.c (enumerator_with_index): should not store local variable
	  address to memoise the arguments.  it is invalidated after the return.
	  [ruby-core:58692] [Bug #9178]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-02 14:48:50 +00:00
nagachika
b851418bb7 merge revision(s) 39594,39596: [Backport #8010]
* enumerator.c (enumerator_with_index_i): allow Bignum as offset, to
	  get rid of conversion exception and integer overflow.
	  [ruby-dev:47131] [Bug #8010]

	* enumerator.c (enumerator_with_index):  Restore handling of a nil memo
	  from r39594.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-02 14:29:37 +00:00
nagachika
83c337f29a merge revision(s) 43853: [Backport #9157]
* file.c (rb_readlink): fix buffer overflow on a long symlink. since
	  rb_str_modify_expand() expands from its length but not its capacity,
	  need to set the length properly for each expansion.
	  [ruby-core:58592] [Bug #9157]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-02 14:06:39 +00:00
nagachika
dd7ec71b12 merge revision(s) 43888: [Backport #9169]
* common.mk (Doxyfile): tool/file2lastrev.rb needs running with
	  BASERUBY since r43617.  [ruby-dev:47823] [Bug #9169]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 15:31:59 +00:00
nagachika
533a4c8d1c merge revision(s) 43780:
util.c: more precision

	* util.c (ruby_strtod): BigMath requires more precision.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 04:19:18 +00:00
nagachika
46cd2f463c merge revision(s) 43775:
* util.c (ruby_strtod): ignore too long fraction part, which does not
	  affect the result.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 04:00:39 +00:00
nagachika
7db42e86b2 * version.h (RUBY_PATCHLEVEL): update patchlevel to 351.
fix commit miss of r43732. [ruby-core:58444] [Backport #9131]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21 04:31:32 +00:00
svn
e0df0af157 * 2013-11-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-20 06:25:33 +00:00
nagachika
2ebea1180e * lib/rubygems: Update to RubyGems 2.0.14. [ruby-core:58300]
[Backport #9104]
  the patch is provided by drbrain (Eric Hodel).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 02:59:08 +00:00
nagachika
71f8a0d2ab merge revision(s) 43449,43514,43525: [Backport #8879] [Backport #8883]
* load.c (ruby_init_ext): share feature names between frame name and
	  provided features.

	* load.c (rb_feature_p): deal with default loadable suffixes.

	* load.c (load_lock): initialize statically linked extensions.

	* load.c (search_required, rb_require_safe): deal with statically
	  linked extensions.

	* load.c (ruby_init_ext): defer initalization of statically linked
	  extensions until required actually.  [Bug #8883]

	* load.c (ruby_init_ext): defer initialization of statically linked


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-12 14:55:40 +00:00
nagachika
f4d766499f merge revision(s) 43609,43617: [Backport #8878] [Backport #9085]
vcs.rb: split

	* tool/vcs.rb: split from file2lastrev.rb.
	* tool/rbinstall.rb (Gem::Specification.load): obtain spec date from
	  VCS for the case using git, RUBY_RELEASE_DATE is the last resort.
	  probably fixes [Bug #9085].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-12 14:35:13 +00:00
nagachika
68eb3d86a1 merge revision(s) 42862(partially),42910,43093: [Backport #8878] [Backport #9085]
* common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can't
	  require extension libraries. The patch is from nobu
	  (Nobuyoshi Nakada).

	* configure.in (RUNRUBY): append -- only after runruby.rb, not
	  cross-compiling baseruby, so that $(RUN_OPT) can be command line
	  options.  [ruby-dev:47703] [Bug #8893]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-12 14:31:59 +00:00
nagachika
52301063d4 merge revision(s) 42902:
vm_method.c: constify

	* vm_method.c (rb_resolve_refined_method): constify.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-11 16:34:16 +00:00
nagachika
8d087aa871 merge revision(s) 40136: [Backport #9084]
* ext/socket/init.c (cloexec_accept): Fix a compile error on
	  Debian GNU/kFreeBSD.  Consider HAVE_ACCEPT4 is defined
	  but SOCK_CLOEXEC is not defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-11 14:55:35 +00:00
nagachika
1ebb3a2b50 merge revision(s) 43398,43407,43408,43417: [Backport #9044]
* win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics
	  functions.  [ruby-core:57981] [Bug #9044]

	* include/ruby/win32.h (rb_infinity_float): suppress overflow in
	  constant arithmetic warnings.  [ruby-core:57981] [Bug #9044]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-11 13:29:58 +00:00
nagachika
f895841e2c merge revision(s) 41808,41829: [Backport #8384] [Backport #9065]
* ext/openssl/ossl_pkey_ec.c: Ensure compatibility to builds of
	  OpenSSL with OPENSSL_NO_EC2M defined, but OPENSSL_NO_EC not
	  defined.

	* test/openssl/test_pkey_ec.rb: Iterate over built-in curves
	  (and assert their non-emptiness!) instead of hard-coding them, as
	  this may cause problems with respect to the different availability
	  of individual curves in individual OpenSSL builds.
	  [ruby-core:54881] [Bug #8384]
	  Thanks to Vit Ondruch for providing the patch!

	* test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
	  they are not suitable for ECDSA.
	  [ruby-core:54881] [Bug #8384]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-31 13:41:58 +00:00
nagachika
d39041bab5 * lib/rubygems: Update to RubyGems 2.0.13. [ruby-core:58031]
[Backport #9052]
  the patch is provided by drbrain (Eric Hodel).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 17:44:33 +00:00
nagachika
b385f19c92 * gc.c (gc_prof_set_heap_info): fix compile error when
GC_PROFILE_MORE_DETAIL != 0.
  the patch is provided by ko1 (Koichi Sasada).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 07:07:35 +00:00
nagachika
9493eb7260 * lib/rubygems: Update to RubyGems 2.0.12. [ruby-core:57818]
[Backport #9014]
  the patch is provided by drbrain (Eric Hodel).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-24 14:31:17 +00:00
nagachika
11239c0e8c merge revision(s) 43413: [Backport #9048]
* parse.y: Remove +(binary) and -(binary) special cases
	  [Feature #9048]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-24 13:58:44 +00:00
nagachika
cafc5a3080 merge revision(s) 43376: [Backport #9038]
* encoding.c (load_encoding): should preserve outer errinfo, so that
	  expected exception may not be lost.  [ruby-core:57949] [Bug #9038]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-24 13:46:04 +00:00
nagachika
57b26f8305 merge revision(s) 43334: [Backport #9030]
* vm_insnhelper.c (vm_call_method): set ci->me to 0 when the
	  original method of a refined method is undef to avoid SEGV.

	* vm_method.c (rb_method_entry_without_refinements): return 0 when
	  the original method of a refined method is undef to avoid SEGV.

	* test/ruby/test_refinement.rb: related test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17 17:34:22 +00:00
nagachika
4c9a4c3331 merge revision(s) 43328: [Backport #9033]
* win32/file.c (rb_file_expand_path_internal): fix memory leaks at
	  a non-absolute home exception.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17 17:09:07 +00:00
nagachika
f0aa371165 merge revision(s) 42068,42069: [Backport #8654]
Suppress warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-10 15:09:36 +00:00
nagachika
c05d019cb4 merge revision(s) 43208: [Backport #9003]
* compar.c (cmp_eq): fail if recursion.  [ruby-core:57736] [Bug #9003]

	* thread.c (rb_exec_recursive_paired_outer): new function which is
	  combinnation of paired and outer variants.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 16:36:05 +00:00
nagachika
a577137cfd merge revision(s) 43110,43155: [Backport #8768]
* lib/tempfile.rb (Tempfile#unlink): finalizer is no longer needed
	  after unlinking.  patched by by normalperson (Eric Wong) at
	  [ruby-core:56521] [Bug #8768]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 16:11:16 +00:00
nagachika
0a57e6c975 merge revision(s) 42040,42041,42047: [Backport #8654]
* array.c (rb_ary_count): iterate items appropriately.
	  [Bug #8654]

	* array.c (rb_ary_count): check length to avoid SEGV
	  while iterating. Remove other pointer loop when arg is given.

	* test/ruby/test_array.rb (test_count): add test for bug.
	  [ruby-core:56072] [Bug #8654]

	* test/ruby/test_array.rb (test_count): add a test case for #count
	  with an argument. See Bug #8654.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 16:04:12 +00:00
nagachika
f4811c7e2b merge revision(s) 43008: [Backport #8769]
* process.c (rb_fork_internal): remove cloexec setting on pipes
	  created by rb_cloexec_pipe.  patch by normalperson (Eric Wong) at
	  [ruby-core:56523].  [Bug #8769]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 15:54:45 +00:00
nagachika
1572c8edda merge revision(s) 43179,43180,43181,43192,43193: [Backport #8990] [Backport #9000]
* configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions
	  from cont.c

	* cont.c (FIBER_USE_NATIVE): split long conditions.

	* cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn't
	  support a combination getcontext() and threads. Patch by
	  Gabriele Giacone (1o5g4r8o@gmail.com). [Bug #8990][ruby-core:57685]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 15:37:54 +00:00
nagachika
6da62adef7 merge revision(s) 43077,43078: [Backport #8937]
* test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurd
	  correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com).

	* test/fiddle/helper.rb: ditto.
	  [Bug #8937][ruby-core:57311]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 15:20:42 +00:00
nagachika
8b73cefeda merge revision(s) 43177,43191: [Backport #8991]
* lib/time.rb (Time.strptime): Use :offset.
	  Patch by Felipe Contreras.  [ruby-core:57694]

	* lib/time.rb (Time.strptime): Time.strptime('0', '%s') returns local
	  time Time object as Ruby 2.0 and before.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 15:07:45 +00:00
nagachika
9eecfd5c2f merge revision(s) 43092: [Backport #8969]
* gc.c (rb_gc_disable): do rest_sweep() before disable GC.
	  This fix may solve a failure of
	  TestTracepointObj#test_tracks_objspace_events
	  [test/-ext-/tracepoint/test_tracepoint.rb:43].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09 14:57:15 +00:00
nagachika
514878d15c merge revision(s) 43112,43114,43117,43118: [Backport #8980]
* io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
	  fix freed pointer access when it is in use by other threads, and get
	  rid of potential memory/fd leak.

	* io.c (rb_io_close_write): detach tied IO for writing before closing
	  to get rid of race condition.  [ruby-list:49598]

	* io.c (rb_io_close_read): duplex IO should wait its child process
	  even after close_read.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-04 17:30:50 +00:00
nagachika
3cfa0074d9 merge revision(s) 43090,43091: [Backport #8966]
* vm_method.c (rb_undef): raise a NameError if the original method
	  of a refined method is not defined. 

	* vm_insnhelper.c (rb_method_entry_eq): added NULL check to avoid SEGV.

	* test/ruby/test_refinement.rb: related test.
	  of a refined method is not defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-04 17:13:11 +00:00
nagachika
ea2c9da96f merge revision(s) 40534,41886,41903,41910: [Backport #8616]
process.c: rb_daemon should not raise

	* process.c (rb_daemon): should not raise exceptions, since
  proc_daemon() will deal with errors.
	* process.c (fork_daemon): kill the other threads all and abandon the
	  kept mutexes.

	* process.c (fork_daemon): kill the other threads all and abandon the
	  kept mutexes.

	* process.c (rb_daemon): daemon(3) is implemented with fork(2).
	  Therefore it needs rb_thread_atfork(). (and revert r41903)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@43142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-04 16:25:39 +00:00