merge revision(s) 34849,34853,34854,34855,34859,34862,35384,35385,36811,36812,36850,36907,36908: [Backport #7174]

	* Makefile.in (PLATFORM_DIR): add a variable for `win32` directory.

	* Makefile.in (clean-platform): add new target.
	  It cleans `win32` directory.

	* common.mk (clean): add a dependency for `win32` directory.

	* common.mk (distclean): ditto.

	* common.mk (distclean-platform): add new target.
	  It cleans `win32` directory.

	* common.mk ($(PLATFORM_D)): add new target to make `win32` directory.

	* common.mk (win32/win32.$(OBJEXT)): move win32.o into `win32`
	  directory.

	* common.mk (win32/file.$(OBJEXT)): add new target for win32/file.c.

	* configure.in: move win32.o into `win32` directory and add
	  win32/file.o to MISSING.

	* file.c (file_load_ok, rb_file_load_ok): replace static
	  file_load_ok() with public rb_file_load_ok().
	  It's to link Windows implementation in win32/file.c.

	* file.c (rb_find_file_ext_safe): ditto.

	* file.c (rb_find_file_safe): ditto.

	* win32/file.c (rb_file_load_ok): new file. Add Windows specific
	  optimized implementation of rb_file_load_ok(). We created a
	  separated file to avoid too many #ifdef macro which is unreadable.

	* win32/Makefile.sub (PLATFORM_DIR): add a variable for `win32`
	  directory.

	* win32/Makefile.sub (MISSING): move win32.obj into `win32`
	  directory and add win32/file.obj to MISSING.

	* win32/Makefile.sub (MAKEDIRS): replace MINIRUBY with BASERUBY.
	  It's because miniruby doesn't exist when making `win32` directory.

	* win32/Makefile.sub (clean-platform): add new target to clean `win32`
	  directory.

	* win32/Makefile.sub ({$(srcdir)}.c{}.obj): make it not match
	  win32/file.c to build properly.

	* win32/Makefile.sub (win32/win32.$(OBJEXT)): move win32.obj into
	 `win32` directory.
	  Patch created with Luis Lavena.
	  [ruby-core:42480] [Feature #5999]

	* win32/Makefile.sub (MAKEDIRS): use mkdir of cmd.exe instead of ruby.
	  [Bug #6103] [ruby-core:43012]

	* win32/README.win32: added a notice about command extension of cmd.exe.

	* win32/makedirs.bat: new command to make intermediate
	  directories, and not to report any errors if the directory
	  already exists.

	* win32/Makefile.sub (MAKEDIRS): enable command extensions.

	* win32/file.c (INVALID_FILE_ATTRIBUTES): define for old SDK.

	* configure.in (mingw): add shlwapi to the list of dependency
	  libs for Windows.

	* win32/Makefile.sub (EXTSOLIBS): ditto.

	* internal.h: declare internal functions rb_w32_init_file,
	  rb_file_expand_path_internal and rb_file_expand_path_fast.

	* file.c (Init_File): invoke Windows initialization rb_w32_init_file

	* win32/file.c (rb_file_load_path_internal): new function.
	  Windows-specific implementation that replaces file_expand_path.
	  [Bug #6836][ruby-core:46996]

	* win32/file.c (rb_w32_init_file): new function. Initialize codepage
	  cache for faster conversion encodings lookup.

	* file.c (file_expand_path): rename to rb_file_expand_path_internal.
	  Conditionally exclude from Windows.

	* file.c (rb_file_expand_path_fast): new function. delegates to
	  rb_file_expand_path_internal without performing a hit to the
	  filesystem.

	* file.c (file_expand_path_1): use rb_file_expand_path_internal without
	  path expansion (used by require).

	* file.c (rb_find_file_ext_safe): ditto.

	* file.c (rb_find_file_safe): ditto.

	* load.c (rb_get_expanded_load_path): use rb_file_expand_path_fast.

	* load.c (rb_feature_provided): ditto.

	* file.c (rb_file_expand_path): use rb_file_expand_path_internal with
	  path expansion.

	* file.c (rb_file_absolute_path): ditto.

	* test/ruby/test_file_exhaustive.rb: new tests to exercise
	  rb_file_expand_path_internal implementation and compliance with
	  existing behaviors.

	* test/ruby/test_file_exhaustive.rb: fix test introduced in r36811 for
	  posix environments where HOME is not defined.  [ruby-core:47322]


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

	* test/etc/test_etc.rb (TestEtc#test_getpwuid): `s' is never set to nil.


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

	test_gem_installer.rb: restore ARGV

	* test/rubygems/test_gem_installer.rb
  (TestGemInstaller#test_install_creates_binstub_that_dont_trust_encoding):
  restore ARGV properly, non-ascii strings in different encodings are
  not equal.  [ruby-core:45975] [Bug #6673]

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

	* lib/rubygems/installer.rb (check_that_user_bin_dir_is_in_path):
	  test_generate_bin_bindir_with_user_install_warning(TestGemInstaller)
	  fails on Windows with msys bash. It makes comparing paths
	  case-insensitive.
	  pick from upstream to fix a failure of test-all [ruby-core:47711]
	  https://github.com/rubygems/rubygems/commit/c474edb2f3704206f04da1c8c6cf9fb079d84abe


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

	* ext/-test-/win32/dln/extconf.rb: remove test DLL.

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

* file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
  (rb_enc_path_last_separator, rb_enc_path_end)
  (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
  path handling functions.

* file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
  (rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
  (rb_file_join): should respect the encodings of arguments than
  file system encoding.  [ruby-dev:45145] [Bug #5919]

* dir.c (check_dirname, ruby_glob0): ditto.

* ext/pathname/pathname.c (path_sub_ext): ditto.

* util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
  [Bug #5153] [ruby-core:38736]

* io.c (argf_next_argv): remove the call of above function.

* ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test
  extension module because this is only for testsing ruby_add_suffix().

* LEGAL: remove the mention about a part of util.c, because now we
  removed the part.

* io.c (argf_next_argv): now the new filename is not guranteed to
  use, so should check the return value of rename(2).

* test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible):
  now we expect same result with other platforms on no_safe_rename
  platforms (=Windows).


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

	* file.c (rmext): no extension to strip if empty string.


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

	* file.c (append_fspath): need to set the encoding to result always.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revisions r33453, r37542:

    * array.c: rdoc fix and improvements

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

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

	* win32/win32.c (has_redirection): should use shell (cmd.exe) when
	  the commandline containts '&'.
	  reported by Roger Pack at [ruby-core:47912] [Bug #7143], and
	  patched by Heesob Park at [ruby-core:47931].


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

	* ext/bigdecimal/bigdecimal.c (BigDecimal_add),
	  test/bigdecimal/test_bigdecimal.rb:
	  need to specify precision for converting Rational and Float.
	  [ruby-core:48045] [Bug #7176]


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

	* vm.c (rb_vm_jump_tag_but_local_jump): pass through thrown objects.
	  [ruby-dev:46234] [Bug #7185]

	* vm_eval.c (rb_eval_cmd): if state is non-zero, val should be nil and
	  rb_vm_jump_tag_but_local_jump() just jump tag.


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

	* configure.in (visibility_option): visibility attribute is not
	  available before GCC 4, so do not use -fvisibility option in that
	  case.  [ruby-core:48147] [Bug #7205]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 36815,36816,36818,37414,37426,37427: [Backport #7217]

Thu Nov  8 14:16:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#timestamp_file): use .-. instead of !, a
	  special character of NMAKE and BSD make.  [Bug #7265]

Thu Nov  8 14:16:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#timestamp_file): use ! instead of %, a GNU
	  make special character.

Thu Nov  8 14:16:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): use timestamp for destination
	  directories to make them before making or copying files there.
	  [ruby-dev:46067] [Bug #6904]



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

	* test/ruby/test_dir_m17n.rb (create_and_check_raw_file_name): add new
	  helper method to ease encoding testing. Patch by Oleg Sukhodolsky.
	  [ruby-core:46589][Bug #6765]

	* test/ruby/test_dir_m17n.rb (test_filename_extutf8): use filesystem
	  encoding when reading entries and comparing.

	* test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_name): removed.

	* test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_jp_name): split test.

	* test/ruby/test_dir_m17n.rb: refactoring. RE should be in the left side
	  of the =~ operator, and compare the result with nil is meaningless.


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

	* test/win32ole/test_win32ole.rb (test_s_codepage_changed):
	  FileSystemObject only supports ANSI or UTF-16LE encoding.
	  Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650]


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

	* test/win32ole/test_win32ole_variant.rb: setting WIN32OLE.locale
	  to pass some assertion.  Thanks to Hiroshi Shirosaki.
	  [ruby-core:46873][Bug #6814]


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

	* test/ruby/test_dir_m17n.rb: sorry, typo.


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

	* test/ruby/test_dir_m17n.rb: remove a garbage.


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