merge revision(s) r40930:

	* test/fiddle/test_c_struct_entry.rb,
	  test/fiddle/test_c_union_entity.rb,
	  test/fiddle/test_cparser.rb, test/fiddle/test_func.rb,
	  test/fiddle/test_handle.rb, test/fiddle/test_import.rb,
	  test/fiddle/test_pointer.rb: don't run test if the system
	  don't support fiddle.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45298: [Backport #9599]

	test/ruby/envutil.rb: compare RSS to check memory leak

	* test/ruby/envutil.rb (Test::Test#assert_no_memory_leak): compare
  also RSS if available.

	* test/ruby/memory_status.rb (Memory::Status.parse): read string
  form of an instance.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45350: [Backport #9645]

	* variable.c (rb_const_set): delete existing entry on redefinition
	  [Bug #9645]

	* test/ruby/test_const.rb (test_redefinition): test for leak


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45311: [Backport #9599]

	r45298 fix trivial bug

	$initial_size must be a size, not a status

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45271: [Backport #9592] [Backport #9670]

	* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
	  error reasons with old OpenSSL, and insert a colon iff formatted
	  message is not empty.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r42230,r42231: [Backport #9651]

	parse.y, vm_eval.c: file encoding in eval

	* parse.y (yycompile): store file name as String to keep the encoding.

	* parse.y (rb_parser_compile_string_path, rb_parser_compile_file_path):
  new functions to pass file name as a String.

	* parse.y (gettable_gen): return a copy of the original file name, not
  a copy in filesystem encoding.

	* vm_eval.c (eval_string_with_cref): use Qundef instead of "(eval)".
	* parse.y (yycompile): store file name as String to keep the encoding.

	* parse.y (rb_parser_compile_string_path, rb_parser_compile_file_path):
	  new functions to pass file name as a String.

	* parse.y (gettable_gen): return a copy of the original file name, not
	  a copy in filesystem encoding.

	* vm_eval.c (eval_string_with_cref): use Qundef instead of "(eval)".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45360,r45361: [Backport #9651]

	* vm_eval.c (eval_string_with_cref): Use file path even if scope is
	  given. Related to [ruby-core:56099] [Bug #8662] and r42103.

	* vm_eval.c (eval_string_with_cref): Unify to use NIL_P.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/envutil.rb (assert_no_memory_leak): increase default value
  of `limit` keyword argument.
  assert_no_memory_leak occasionally fails with limit=1.5.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) r45374: [Backport #8405]

	* lib/csv.rb: Fixed a broken regular expression that was causing
	  CSV to miss escaping some special meaning characters when used
	  in parsing.
	  Reported by David Unric
	  [ruby-core:54986] [Bug #8405]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 45488: [Backport #9631]

	* ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`.
	  [ruby-core:61756] [Bug #9578]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 43682,43727,43752,43759: [Backport #9560]

	* lib/delegate.rb (Delegator#send): override to get rid of global function interference.
	  [Fixes GH-449]

	* lib/delegate.rb (Delegator#send): separate from method_missing so
	  that super calls proper method.

	* lib/delegate.rb (Delegator#method_missing): try private methods defined in
	  Kernel after the target.  [Fixes GH-449]

	* lib/delegate.rb (SimpleDelegator#__getobj__): target object must be set.

	* lib/delegate.rb (DelegateClass#__getobj__): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 45320,45321: [Backport #9622]

	* vm_insnhelper.c (vm_callee_setup_arg): turn a macro into an
	  inline function.

	* vm_insnhelper.c (vm_callee_setup_arg): disable fastpath if splat
	  argument, since argc may differ for each calls.
	  [ruby-core:61422] [Bug #9622]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
missed at previous commit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 45367,45387,45388,45389: [Backport #9475]

* vm_method.c (rb_method_entry_get_without_cache): me->klass is 0
  for a method aliased in a module.  [ruby-core:61636] [Bug #9663]

* vm_method.c (rb_method_entry_get_without_cache): get rid of
  infinite recursion at aliases in a subclass and a superclass.
  return actually defined class for other than singleton class.
  [ruby-core:60431] [Bug #9475]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 45365: [Backport #9656]

	dl/extconf.rb: check for -fno-defer-pop option

	* ext/dl/extconf.rb: check for -fno-defer-pop option, since clang
  5.1 no longer support -fno-defer-pop option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 45364,45395,45396,45403,45406: [Backport #9652]

	* time.c (time_mload): freeze and preserve marshal-loaded time zone

	* test/ruby/test_time.rb: add test for GC on loaded object
	  [Bug #9652]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 45471: [Backport #9688]

	* win32/win32.c (rb_w32_accept, open_ifs_socket, socketpair_internal):
	  reset inherit flag of socket to avoid unintentional inheritance of
	  socket.  note that the return value of SetHandleInformation() is not
	  verified intentionally because old Windows may return an error.
	  [Bug #9688] [ruby-core:61754]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 45518: [Backport #9702]

	* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
	  [ruby-dev:48089] [Bug #9702]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
revert r45747 because it introduced severe incompatibility.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
missed at r45748.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e