merge revision(s) 34785,35095,35098,35111,35152: [Backport #6294]

	* io.c (set_binary_mode_with_seek_cur): reorder function qualifiers.
	* test/ruby/test_io.rb (TestIO#test_pos_with_getc): added.
	  see [Bug #6179][ruby-core:43518]

	* test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated.
	  see [ruby-core:43550]

	* io.c (static int io_fflush): add the definition.
	  Use it in set_binary_mode_with_seek_cur().

	* io.c (set_binary_mode_with_seek_cur): refactoring to split the
	  content into io_unread(). Fix the possibility of buffer overflow.

	* io.c (io_unread): add new implementation for Windows. Previous one
	  caused invalid cursor position using IO#pos with OS text mode. New
	  one fixes the bug.

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_pos_dont_move_cursor_position): add a test for
	  above bug.
	  [ruby-core:43497] [Bug #6179]

	* io.c (io_unread): fixed memory leak.  report by nagachika via IRC.


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

	* io.c (rb_io_eof): use eof() instead of io_fillbuf(). It's because
	  io_unread() doesn't work properly when reading CRLF with read(length)
	  and mode 'r'.
	  [ruby-core:44189][Bug #6271]

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_read_crlf_and_eof):
	  test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35249,35250: [Backport #6296]

	* include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of
	  new function.

	* process.c (enum): add EXEC_OPTION_PGROUP and move the position
	  above for the usage in proc_spawn_n().

	* process.c (proc_spawn_n): add an argument to pass new option
	  `new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to
	  CreateProcessW(). This flag is necessary for the usage of
	  Process.kill on the subprocess on Windows.

	* process.c (rb_exec_arg_addopt): ditto.

	* process.c (rb_spawn_process): ditto.

	* process.c (documentation for rb_f_spawn): add documentation for new
	  option `new_pgroup` of spawn.

	* test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup):
	  add tests for option `new_pgroup`.

	* test/ruby/test_thread.rb
	  (TestThreadGroup#test_thread_timer_and_interrupt):
	  add option `new_pgroup: true` to spawn on Windows. It's needed for
	  Process.kill on a subprocess.

	* win32/win32.c (CreateChild): add an argument to pass
	  dwCreationFlags of CreateProcessW().

	* win32/win32.c (rb_w32_spawn): ditto.

	* win32/win32.c (rb_w32_aspawn_flags): add new function to pass
	  dwCreationFlags.

	* win32/win32.c (rb_w32_aspawn): refactor to move the content to
	  rb_w32_aspawn_flags().
	  [ruby-core:43245][Bug #6131]

	* test/ruby/test_thread.rb
	  (TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows.
	  Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP
	  flag is not specified in a call to CreateProcessW().

	* win32/win32.c (CreateChild): revert the usage of
	  CREATE_NEW_PROCESS_GROUP flag for compatibility.
	  [ruby-core:43245][Bug #6131]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 32799:

	* test/ruby/test_process.rb (TestProcess#windows?): new method.

	* test/ruby/test_process.rb (TestProcess#*): use above method.

	* test/ruby/test_process.rb (TestProcess#test_execopts_redirect):
	  windows doesn't support FD_CLOEXEC.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 34106:

	* test/test_pty.rb (test_pty_check_default): call PTY.check until
	  "cat" command is finished.


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

[Backport #6304]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2012-04-16

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35352:

	* dln.c (rb_w32_check_imported): skip ordinal entries.  patched by
	  phasis68 (Heesob Park) at [ruby-core:44381].  [Bug #6303]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35354,35356,35357,35361:

	* dln.c (rb_w32_check_imported): skip ordinal entries.  based on a
	  patch by phasis68 (Heesob Park) at [ruby-core:44381].
	  [ruby-core:44371][Bug #6303]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35363:

	win32/dln is only for win32.

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

	* lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:
	  fix the default xml namespace URI validation.
	  [ruby-dev:45169] [Bug #5956]
	  Reported by Miho Hiramatsu. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35368:

	* ext/-test-/win32/dln/extconf.rb: fix for mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35387:

	* configure.in (DOT, DOXYGEN): use AC_CHECK_PROGS instead of
	  AC_CHECK_PROG which needs the third argument.  [ruby-core:44433]
	  [Bug #6316]

	* configure.in (PKG_CONFIG): fix condition to skip older version
	  of pkg-config.  continue in backticks does not affect outside.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35395:

	* ext/-test-/win32/dln/extconf.rb: need import library for ordinal
	  entry even on mingw.  [ruby-core:44441][Bug #6320]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Backport r35374 and r35375

* lib/rubygems:  Update to RubyGems 1.8.22 plus r33517 and r35337 which
  were ported to the rubygems git repository.

  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
  changes since 1.8.11.

* test/rubygems:  ditto.

* lib/rubygems/version.rb:  Fixed init_with warning by calling into
  yaml_initialize (for syck) from psych's init_with



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2012-04-20

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Backport security fixes for rubygems from r35404 

* lib/rubygems:  Update to RubyGems 1.8.23 which contains security
  fixes:

  RubyGems now disallows redirection from HTTPS to HTTP.

  RubyGems now verifies SSL connections.

  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
  changes since 1.8.22.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35389:

	Use mock of Gem::Security::OPT[:trust_dir]

	Gem::Security::OPT[:trust_dir] depends Gem.user_home but doesn't reset
	on setup/teardown.
	NOTE: Gem.user_home won't be recovered now, so teardown doesn't work.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Merged r35411 from trunk:

* lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem:  Removed to avoid
  conflict with ca-bundle.pem
* lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem:
  ditto.
* lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem:
  ditto.


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