* 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/trunk@39967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/-ext-/num2int/test_num2int.rb (asert_num2i_success): New
  utility method.
  (asert_num2i_error): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (LONG_MIN_MINUS_ONE_IS_LESS_THAN): New macro.
  (LLONG_MIN_MINUS_ONE_IS_LESS_THAN): Ditto.
  (rb_num2long): Use LONG_MIN_MINUS_ONE_IS_LESS_THAN.
  (rb_num2ulong): Ditto.
  (rb_num2ll): Use LLONG_MIN_MINUS_ONE_IS_LESS_THAN.
  (rb_num2ull): Ditto.

* test/-ext-/num2int/test_num2int.rb (asert_num2i_success): Test the
  value converted into a Float if Float can represent the value
  exactly.
  (asert_num2i_error): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix typos

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-03-28

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/defines.h: Fix a compilation error on NetBSD,
  "type of formal parameter 1 is incomplete" for the rb_thread_wait_for
  invocation in rb_file_flock, by including header files as
  AC_INCLUDES_DEFAULT of autoconf.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/intern.h: Delete redundant inclusions caused by
  AC_INCLUDES_DEFAULT in defines.h.

* include/ruby/defines.h: Ditto.

* include/ruby/ruby.h: Ditto.

* include/ruby/st.h: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext/tk/tcltklib.c: adjust nesting

* ext/tk/extconf.rb: check for rb_thread_alive_p and
  rb_thread_check_trap_pending.

* ext/tk/tcltklib.c (rb_thread_alive_p, rb_thread_check_trap_pending):
  define substitutions if not available.

* ext/tk/tcltklib.c (lib_eventloop_core, lib_eventloop_ensure),
  (lib_thread_callback, ip_rbUpdateCommand, ip_rbVwaitCommand),
  (ip_rbTkWaitCommand, call_queue_handler, eval_queue_handler),
  (invoke_queue_handler): adjust nesting.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tcltklib.c: suppress warnings

* ext/tk/tcltklib.c (lib_eventloop_core, lib_thread_callback),
  (ip_rbUpdateCommand, ip_rb_threadUpdateCommand, lib_toUTF8_core),
  (ip_invoke_core): remove unused variables.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* properties.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/-ext-/num2int/test_num2int.rb: extract
  assert_num2i_success_internal and assert_num2i_error_internal and
  provide assertion messages as "NUM2XXX(NNN)".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix a typo

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tcltklib.c: rb_thread_alive_p macro

* ext/tk/tcltklib.c (rb_thread_alive_p): turn into a macro, so that
  same code is generated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby/io.h: get rid of conflict on AIX

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/resolv.rb: Test Windows platform by detecting LoadError when
  require 'win32/resolv' suggested by Nobuyoshi Nakada [ruby-core:53389].
  [ruby-core:53388] [Feature #8090] Reported by Charles Nutter.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mkmf.rb: force refererence in MAIN_DOES_NOTHING

* 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/trunk@39989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-03-29

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (rb_num2ull): Cast double to unsigned LONG_LONG via
  LONG_LONG instead of double to unsigned LONG_LONG directly.
  This is a challenge to fix a test_num2ull(TestNum2int)
  failure (NUM2ULL(-1.0) should be "18446744073709551615" but was "0")
  on Mac OS X with 32bit clang.
  http://a.mrkn.jp/~mrkn/chkbuild/mountain_lion/ruby-trunk-m32-o0/log/20130328T191100Z.diff.html.gz


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
code cleanup by @vipulnsward [GH fixes #267]

 * lib/cgi/core.rb: change each to each_value
 * ext/bigdecimal/lib/bigdecimal/{jacobian,math}.rb:
   remove unused variables from bigdecimal lib



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby/io.h: get rid of conflict on AIX

* 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]

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