aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* * test/ruby/test_io.rb (TestIO#test_fcntl_dupfd): fix OpenBSD testkosaki2011-11-151-2/+2
| | | | | | | | failure. [ruby-dev:44872] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r33752 and fix test case based [ruby-dev:44866].ayumin2011-11-141-4/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (test_fcntl_dupfd): fix test error onayumin2011-11-141-1/+2
| | | | | | SnowLeopard. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big2ull): fix 32bit platform breakage. we mustkosaki2011-11-141-6/+4
| | | | | | | | | | not assume sizeof(VALUE) == sizeof(LONG_LONG). * test/-ext-/num2int/test_num2int.rb (class TestNum2int): fix false assumption on 32bit platform. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.kosaki2011-11-141-0/+40
| | | | | | | | | | | * numeric.c: ditto. * test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT(). * ext/-test-/num2int/num2int.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big2ull): fix off-by-twice bug of NUM2ULL.kosaki2011-11-141-12/+3
| | | | | | | | | * test/-ext-/num2int/test_num2int.rb (class TestNum2int): fix a testcase too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/num2int/test_num2int.rb (class TestNum2int):kosaki2011-11-141-0/+53
| | | | | | | | add FIXNUM tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (check_uint): fix off-by-one bug of NUM2UINT.kosaki2011-11-141-0/+145
| | | | | | | | | | | | | | * bignum.c (rb_big2ulong): fix off-by-one bug of NUM2ULONG. * test/-ext-/num2int/test_num2int.rb: add a testcase for NUM2INT() NUM2UINT(), NUM2LONG(), NUM2ULONG(), NUM2LL and NUM2ULL(). * ext/-test-/num2int/depend: ditto. * ext/-test-/num2int/extconf.rb: ditto. * ext/-test-/num2int/num2int.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/webrick/test_cgi.rb (class TestWEBrickCGI): respectkosaki2011-11-122-0/+2
| | | | | | | | | RbConfig::CONFIG["LIBPATHENV"]. [Bug #5135] [ruby-core:38653] * test/webrick/test_filehandler.rb (class WEBrick): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (test_fcntl_dupfd): skip if Fcntl::DUPFDkosaki2011-11-121-1/+1
| | | | | | | | is not defined. Pointed out by CHIKANAGA Tomoyuki. Thanks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.kosaki2011-11-121-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (test_fcntl_lock_freebsd): add a testcasekosaki2011-11-121-1/+36
| | | | | | | | of fcntl lock for freebsd. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (ioctl_req_t): Type of req argument of ioctl() depend on platform.kosaki2011-11-121-0/+12
| | | | | | | | | | | | | Moreover almost all linux ioctl can't be represented by 32bit integer (i.e. MSB is 1). We need wrap ioctl argument type. [Bug #5429] [ruby-dev:44589] * io.c (struct ioctl_arg): ditto. * io.c (rb_ioctl): ditto. * test/ruby/test_io.rb (test_ioctl_linux): add a testcase for ioctl git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):usa2011-11-091-1/+2
| | | | | | | fixed previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):usa2011-11-091-0/+13
| | | | | | | add test for r33685. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_fiber.rb: add tests for r33684 (Fiber#resume).ko12011-11-091-0/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/tree_builder.rb: dump complex numbers,tenderlove2011-11-081-0/+67
| | | | | | | | | | rationals, etc with reference ids. * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers, rationals, etc with reference ids. * test/psych/test_object_references.rb: corresponding tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* FreeBSD 8.2 sticks this [ruby-dev:44726] [Bug #5524]naruse2011-11-081-0/+3
| | | | | | http://redmine.ruby-lang.org/issues/5524 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dbm/test_dbm.rb: split tests for read only database.akr2011-11-082-24/+60
| | | | | | | | * test/gdbm/test_gdbm.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,usa2011-11-071-0/+57
| | | | | | | | | | | | | | | | | | | | | | ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro. * io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv): set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO if the flag is available. * io.c (make_writeconv): drop decorators for reading. * io.c (make_readconv): drop decorators for writing. * io.c (do_writeconv): existing writeconv is not the condition to raise ArgumentError. should check textmode or not. * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that looktenderlove2011-11-071-0/+6
| | | | | | | like base 60 numbers are serialized as quoted strings. * test/psych/test_string.rb: test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamlstore.rb: make test case inherit from MiniTest,tenderlove2011-11-071-4/+3
| | | | | | load psych/helper so that psych is loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamldbm.rb: Test case should inherit from MiniTest,tenderlove2011-11-071-4/+5
| | | | | | load psych/helper so that psych and friends are loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io_m17n.rbusa2011-11-071-0/+20
| | | | | | | | (TestIO_M17N#test_default_stdout_stderr_mode): new test for r33627-33629. see [backport #5565] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_engine.rb: add test for engine cipher. RC4 is usedemboss2011-11-051-0/+22
| | | | | | | because AES is not supported by the "openssl" engine currently. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_pkey_rsa.c (rsa_generate): [SECURITY] Set RSAnahi2011-11-041-0/+12
| | | | | | | | | | | | | | | exponent value correctly. Awful bug. This bug caused exponent of generated key to be always '1'. By default, and regardless of e given as a parameter. !!! Keys generated by this code (trunk after 2011-09-01) must be re-generated !!! (ruby_1_9_3 is safe) * test/openssl/test_pkey_rsa.rb: Add tests for default exponent and specifying exponent by a parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_engine.rb: add first tests for builtin "openssl"emboss2011-11-041-4/+38
| | | | | | | engine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't define tests if there is no psych.naruse2011-11-032-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_process.rb: clean up a garbage character.nagachika2011-11-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for close-on-exec.akr2011-11-035-0/+94
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* close a socket in test_socket_new.akr2011-11-031-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_engine.rb: call Engine::cleanup on exit.emboss2011-11-021-0/+1
| | | | | | | | Patch provided by Yui Naruse, thanks! [Bug #5547] [ruby-core:40669] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_rationalize): fix function. [ruby-core:40667]nobu2011-11-021-0/+1
| | | | | | [Bug #5546] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamldbm.rb: avoid platform dependency.ayumin2011-11-012-8/+8
| | | | | | | patch by Naohisa Goto. [ruby-dev:44763] [Bug #5535] * test/syck/test_yamldbm.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_marshal.rb: renamed methods duplicated with thoseshugo2011-11-011-2/+2
| | | | | | of marshaltestlib.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* On some platforms, object_id can be negative value like NetBSD.naruse2011-11-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS): retry IO.select for premature wakeup.akr2011-10-311-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/resolv/test_dns.rb: don't check maximum sleeped time.akr2011-10-311-2/+2
| | | | | | | | | ruby doesn't guarantee the maximum time because it is not a realtime application. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a comment.akr2011-10-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* A test for r33542.naruse2011-10-281-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_divide): raise ZeroDivisionError if divisor isnobu2011-10-271-0/+3
| | | | | | zero, as well as Fixnum. [ruby-core:40429] [Bug #5490] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_bignum.rb: ensure constants to be Bignum.nobu2011-10-271-12/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_join): honor input encodings than ASCII-8BIT.nobu2011-10-261-0/+9
| | | | | | [ruby-core:40338] [Bug #5483] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Follow the error format changed by FreeBSD 9.naruse2011-10-241-2/+2
| | | | | | | | | FreeBSD 8.2's last line is "./configure: Can't open ./configure: No such file or directory\n"" but FreeBSD 9's is "cannot open ./configure: No such file or directory\n"". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (copy_stream_fallback_body): check nil for EOF of read method.akr2011-10-231-0/+22
| | | | | | | patch by Eric Wong. [ruby-core:39134] [Bug #5237] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_ssl.rb (test_multibyte_read_write): start serverakr2011-10-221-14/+12
| | | | | | | for each length to avoid race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_fd_set_cloexec): declared.akr2011-10-222-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * io.c (rb_fd_set_cloexec): new function. (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag. (rb_sysopen_internal): ditto. (rb_pipe): ditto. (io_reopen): ditto. (io_cntl): ditto. * process.c (rb_f_exec): change the default :close_others option to true. (rb_f_system): ditto. (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set close-on-exec flag. (ruby_setsid): ditto. (rb_daemon): ditto. * thread_pthread.c (rb_thread_create_timer_thread): call rb_fd_set_cloexec to set close-on-exec flag. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto. * ext/socket/init.c (rsock_socket): ditto. (rsock_s_accept_nonblock): ditto. (rsock_s_accept): ditto. * ext/socket/socket.c (rsock_sock_s_socketpair): ditto. * ext/socket/ancdata.c (discard_cmsg): ditto. (make_io_for_unix_rights): ditto. * ext/socket/unixsocket.c (unix_recv_io): ditto. * ext/io/console/console.c (console_dev): ditto. [ruby-core:38140] [Feature #5041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb: make timeout configurable for DNS query.akr2011-10-221-0/+24
| | | | | | | patch by Eric Wong. [ruby-core:38533] [Feature #5100] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ns_spki.c: Complete documentation.emboss2011-10-201-0/+1
| | | | | | | * test/openssl/test_ns_spki.rb: Integrate SPKI#to_text. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_pkcs5.rb: add RFC 6070 tests for PBKDF2 withemboss2011-10-201-0/+97
| | | | | | | HMAC-SHA1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e