Commit graph

6019 commits

Author SHA1 Message Date
nobu
48b19a3a75 dir.c: get rid of FindFirstFile bug
* dir.c (do_stat): use rb_w32_ustati64() in win32.c to get rid of
  mysterious behavior of FindFirstFile() Windows API which treat "<"
  and ">" like as wildcard characters.  [ruby-core:55764] [Bug #8597]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-03 05:15:28 +00:00
nobu
8cbd501ed0 test/ruby: independent from pathname
* test/ruby/test_dir.rb (TestDir#setup): remove dependency on pathname.

* test/ruby/test_rubyoptions.rb (TestRubyOptions#with_tmpchdir): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-03 05:11:58 +00:00
shugo
72d3e2b102 * eval.c (rb_using_module): activate refinements in the ancestors of
the argument module to support refinement inheritance by
  Module#include.  [ruby-core:55671] [Feature #8571]

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-01 03:57:16 +00:00
nobu
3a01b9ec91 win32: UTF-8 spawn
* test/ruby/test_process.rb (test_spawn_nonascii): assertions for
  non-ascii arguments.  [ruby-core:24309] [Bug #1771]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 05:06:43 +00:00
nobu
5197f451de win32.c: use backslash
* win32/win32.c (join_argv): use backslash instead of slash in program
  path, otherwise cannot invoke "./c\u{1ee7}a.exe" for some reason.
  [ruby-core:24309] [Bug #1771]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:59:25 +00:00
nobu
637d668bca win32: UTF-8 spawn
* io.c (spawnv, spawn): use UTF-8 spawn family.  [Bug #1771]
* process.c (proc_exec_sh, proc_spawn_cmd, proc_spawn_sh): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:59:21 +00:00
nobu
3a6bcb63d8 test_process.rb: File.realpath directly
* test/ruby/test_process.rb (with_tmpchdir): use File.realpath
  directly, no need to depend on pathname.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:23:35 +00:00
charliesome
7ffd3e9444 * numeric.c (fix_mul): remove FIT_SQRT_LONG test as it was causing
fix_mul to return an incorrect result for -2147483648*-2147483648
  on 64 bit platforms

* test/ruby/test_integer_comb.rb (class TestIntegerComb): add test case

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-28 16:09:08 +00:00
akr
a5fcce2820 * ext/socket/ipsocket.c (init_inetsock_internal): Don't use local
addresses which address family is different to remote address.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-28 03:16:07 +00:00
naruse
db50aa78fb Wait more
20130627T230301Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-28 00:52:16 +00:00
nagachika
bc47f294ee * ext/openssl/lib/openssl/ssl.rb (verify_certificate_identity): fix
hostname verification. Patched by nahi.

* test/openssl/test_ssl.rb (test_verify_certificate_identity): test for
  above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-27 11:09:19 +00:00
naruse
044387a1d7 Get ps result if fork-wait is timeouted
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-27 10:16:17 +00:00
shirosaki
26646186af * test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): skip if
writing a file is slow.
  [ruby-core:55541] [Bug #8519]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-26 12:21:21 +00:00
akr
9be51267b5 * bignum.c (bigand_int): Consider negative values.
(bigor_int): The allocated bignum should have enough size
  to store long.
  This fixes (bignum fits in a BDIGIT) | (fixnum bigger than BDIGIT)
  on platforms which SIZEOF_BDIGITS < SIZEOF_LONG,
  such as LP64 with 32bit BDIGIT (no int128).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-26 03:16:12 +00:00
akr
3a81008354 * test/socket/test_udp.rb: Close sockets explicitly.
Don't use fixed port number.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-26 03:09:54 +00:00
knu
8cc3103722 * lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make): Pass
DESTDIR via command line to override what's in MAKEFLAGS.  This
  fixes an installation problem under a package building
  environment where DESTDIR is specified in the (parent) command
  line. [Fixes GH-327]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-25 13:28:57 +00:00
mrkn
448c66c516 * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix for the cases when
the argument x is not a BigDecimal.
  This change is based on the patch made by Garth Snyder.
  [Fix GH-332] https://github.com/ruby/ruby/pull/332

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-25 12:29:00 +00:00
shirosaki
66ee8a1785 test_rinda.rb: fix for unimplemented ifindex()
* test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6):
  ifindex() function may not be implemented on Windows. We use another
  check for the case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-24 13:39:17 +00:00
shirosaki
a75e4aef9a test_gdbm.rb: skip a test on Windows
* test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_nolock):
  skip a failing test on Windows because flock() implementation is
  different from Unix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-24 13:39:15 +00:00
shirosaki
274f1c8806 test_gem_installer.rb: fix a test failure
* test/rubygems/test_gem_installer.rb (test_install_extension_flat):
  use ruby in build directory in case ruby is not installed.
  [ruby-core:53265] [Bug #8058]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-24 13:39:12 +00:00
akr
972ae3e538 * bignum.c (bary_unpack_internal): Specialized unpacker implemented.
(bary_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION.
  (rb_integer_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22 11:38:19 +00:00
akr
8f0c3ff6e4 * bignum.c (bary_pack): Support
INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION flag.
  Fix byte order and word order handling in code specialized for
  wordsize % SIZEOF_BDIGITS == 0.

* internal.h (INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION): Defined.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22 09:55:27 +00:00
ryan
c816f90e76 Imported minitest 4.7.5 (r8724)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22 00:20:05 +00:00
akr
8e9c9ec8e4 * bignum.c (bary_pack): Specialized packers implemented.
(HOST_BIGENDIAN_P): New macro.
  (ALIGNOF): New macro.
  (CLEAR_LOWBITS): New macro.
  (FILL_LOWBITS): New macro.
  (swap_bdigit): New macro.
  (bary_2comp): Returns an int.

* internal.h (swap16): Moved from pack.c
  (swap32): Ditto.
  (swap64): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21 17:22:14 +00:00
nobu
0e8fc182e3 test_filehandler.rb: fix for non-NTFS
* test/webrick/test_filehandler.rb (test_script_disclosure): Alternate
  Data Stream is available only on NTFS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21 06:15:36 +00:00
nobu
afc75f2284 test_filehandler.rb: reap zombie
* test/webrick/test_filehandler.rb (test_short_filename): use backtick
  to reap zombie, instead of leaving opened stream after reading.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21 06:15:34 +00:00
nobu
b9c94bce7f test_env.rb: fix test
* test/ruby/test_env.rb (test_win32_blocksize): fix remained size, and
  delete added envvars.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21 05:31:38 +00:00
nobu
42a086502b test_client.rb: load openssl
* test/xmlrpc/test_client.rb: try loading openssl to fix autoloading
  constant.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 21:48:03 +00:00
akr
6ea1aee76e * bignum.c (bary_unpack_internal): Return -2 when negative overflow.
(bary_unpack): Set the overflowed bit if an extra BDIGIT exists.
  (rb_integer_unpack): Set the overflowed bit.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 13:05:27 +00:00
nobu
c76ebddc9f test_sdbm.rb: only if SDBM
* test/sdbm/test_sdbm.rb (TestSDBM): test only if SDBM is loadable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 09:18:36 +00:00
nobu
a12c414d7e test_fiber.rb: longer timeout
* test/ruby/test_fiber.rb (test_many_fibers): make timeout longer.
  10sec is not sufficient.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 04:08:49 +00:00
nobu
d6f6f21816 envutil.rb: refine message
* test/ruby/envutil.rb (invoke_ruby): refine message and skip
  innermost backtrace on timeout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 04:08:47 +00:00
nobu
05dd6b194c envutil.rb: keyword arguments
* test/ruby/envutil.rb (invoke_ruby, assert_normal_exit),
  (assert_in_out_err, assert_ruby_status, assert_separately): use
  keyword arguments so that optional parameters can be omitted.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 04:08:41 +00:00
naruse
e045a7253e GC before fork to avoid spending too much time in timeout block
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 01:49:21 +00:00
naruse
656c3b5422 collect zombies
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 18:04:16 +00:00
nobu
2fe89ab618 test_process.rb: redirect to null
* test/ruby/test_process.rb (test_no_curdir): since standard handles
  cannot close on Windows, redirect to null device.

* test/ruby/test_process.rb (assert_fail_too_long_path): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 17:46:39 +00:00
naruse
19a50877e6 Join the thread to collect zombies
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:59:41 +00:00
nobu
a929da7135 test_signal.rb: use standard fds
* test/ruby/test_signal.rb (test_exit_action): use IO.popen and
  standard file descriptors instead of fd 3 and 4, which is not
  available on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:57:14 +00:00
nobu
98ca921088 test_signal.rb: use SIGINT if needed
* test/ruby/test_signal.rb (test_kill_immediately_before_termination):
  use SIGINT if SIGUSR1 is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:57:11 +00:00
nobu
9f473df72a test_pty.rb: reap zombie
* test/test_pty.rb (test_cloexec): reap zombie than leaving to
  detaching thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 09:17:23 +00:00
nobu
b0f623f5f4 drbtest.rb: DRbBase
* test/drb/drbtest.rb (DRbBase): extract from DRbCore and DRbAry for
  setup_service and teardown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:38 +00:00
nobu
226fcd5814 test_sdbm.rb: open_db_child
* test/sdbm/test_sdbm.rb (TestSDBM#open_db_child): open the db in a
  child process and handshake using popen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:36 +00:00
nobu
7b253adc68 test_gdbm.rb: open_db_child
* test/gdbm/test_gdbm.rb (TestGDBM#open_db_child): open the db in a
  child process and handshake using popen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:33 +00:00
nobu
56fae61460 test_dbm.rb: no fork
* test/dbm/test_dbm.rb (have_fork?): no longer used already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:31 +00:00
nobu
96734f26e4 test_rinda.rb: no fork
* test/rinda/test_rinda.rb (have_fork?): no longer used already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:29 +00:00
nobu
689333a0ba test/testunit: reap zombie
* test/testunit/test_hideskip.rb (test_hideskip): reap zombie by
  reading with IO.popen instead of separated spawn and assert.

* test/testunit/test_redefinition.rb (test_redefinition): ditto.

* test/testunit/test_sorting.rb (test_sorting): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:26 +00:00
nobu
c704bb3149 test_rinda.rb: reap zombie
* test/rinda/test_rinda.rb (test_take_bug_8215): reap zombie.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:24 +00:00
nobu
76a45efd38 test_gdbm.rb: reap zombie
* test/gdbm/test_gdbm.rb (TestGDBM#have_fork): reap zombie

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:22 +00:00
nobu
bc1bfb6997 test_curses.rb: reap zombie
* test/test_curses.rb (TestCurses#run_curses): reap zombie, since
  PTY.spawn with block does not wait the sub process but just
  detaches.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:19 +00:00
nobu
4f95e22d9c test_io.rb: use assert_separately
* test/ruby/test_io.rb (test_cross_thread_close_stdio): use
  assert_separately instead of separated fork and assert.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:17 +00:00