merge revision(s) 39958,39989: [Backport #8169]

	* lib/mkmf.rb (MAIN_DOES_NOTHING): force to refer symbols for tests
	  to be preserved.  [ruby-core:53745] [Bug #8169]

	* lib/mkmf.rb (MAIN_DOES_NOTHING): ensure symbols for tests to be
	  preserved.  [ruby-core:53745] [Bug #8169]


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

	* ext/fiddle/closure.c (initialize): check mprotect's return value.
	  If mprotect is failed because of PaX or something, its function call
	  will cause SEGV.
	  http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130401T210301Z.diff.html.gz


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

	* lib/mkmf.rb (configuration): not include all CFLAGS in CXXFLAGS, to
	  use different set than C for C++.  [ruby-core:45273] [Bug #6504]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 39987,39993,39998: [Backport #8174]

	* include/ruby/io.h: rename SVR3,4 member names as POSIX compliants,
	  to get rid of conflict on AIX.  [ruby-core:53765] [Bug #8174]

	* include/ruby/io.h: undef POSIX compliants names on AIX, which are no
	  longer needed.  patch suggested by edelsohn (David Edelsohn) in
	  [ruby-core:53815].  [Bug #8174]

	* include/ruby/io.h: undef POSIX compliant names on AIX, which are no

	* include/ruby/io.h: rename SVR3,4 member names as POSIX compliant,


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

	* win32/file.c (code_page): use cp1252 instead of cp20127 as US-ASCII.
	  fix [ruby-core:53079] [Bug #7996]
	  reported and patched by mmeltner (Michael Meltner).
	  reported by mitchellh (Mitchell Hashimoto).


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

	* class.c (HAVE_METACLASS_P): should check FL_SINGLTON flag before get
	  instance variable to get rid of wrong warning about __attached__.
	  [ruby-core:53839] [Bug #8188]

	* class.c (HAVE_METACLASS_P): should check FL_SINGLETON flag before get


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

	Document the default Net timeout values by @toolmantim [GH fixes #269]

 * lib/net/{ftp,http,pop,smtp}.rb: added documentation for default values.



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

	doumentation by @toolmantim [GH fixes #270]

 * timeout.rb: Document Timeout::timeout 0 and nil argument behavior



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

	* ext/objspace/objspace.c: Fix typo in doc. Patch by Sho Hashimoto.
	  [Bug #8116] [ruby-dev:47177]


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

	* time.c (num_exact): use to_r method only if to_int method is
	  available.
	  [ruby-core:53764] [Bug #8173] reported by Hiro Asari.


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

	* string.c (String#gsub): fix typo in documentation

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

	* dir.c (File.fnmatch): fix typo in documentation

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

	* test/test_curses.rb: tests for getch.
	* ext/curses/curses.c (Init_curses): fix implementation function,
	  crmode should be same as cbreak.  [ruby-core:54013] [Bug #8222]


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

	* compile.c (iseq_compile_each): fix of defined? with empty
	  expression.  [ruby-core:53999] [Bug #8220]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
revert r40311(merge revision(s) 40117,40118).
It breaks rubyci tests.


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

	* configure.in: Fix c++ compiler auto-selection not only for
	  Darwin 11.x, but also the other versions of Darwin.

	* configure.in: set ac_cv_prog_cxx if CXX is supplied.


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

	* lib/cgi/util.rb (CGI::unescapeHTML): fix Hexadecimal numeric character.
  [Bug #8183]

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

	fixed wrong value by @taksatou [fix GH-287]


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

	fix ENV.to_a rdoc example by @benolee [fix GH-288]


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

	test_method.rb: reduce iteration

	* test/ruby/test_method.rb (TestMethod#test_bound_method_entry):
  reduce iteration.


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