aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* lib/test/unit.rb: format workers results in the parentnobu2012-06-151-2/+3
| | | | | | | * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): format workers results in the parent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2012-06-131-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_Tngoto2012-06-131-2/+2
| | | | | | | for size_t variables. [ruby-dev:45733] [Bug #6584] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2012-06-121-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_exec_fillarg): treat '=' character as an metaakr2012-06-121-0/+7
| | | | | | | | character to detect assignments preceding command name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update tests.akr2012-06-111-103/+225
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_iseq.rb (TestISeq#test_disasm_encoding): set defaultnobu2012-06-101-4/+6
| | | | | | encoding not to be affected by environment variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_fork_internal): call after_fork only unlessakr2012-06-101-0/+9
| | | | | | | | chfunc_is_async_signal_safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_pkey_ec.cemboss2012-06-101-0/+16
| | | | | | | | | test/openssl/test_pkey_ec.rb: Add support for EC_POINT_mul. Patch provided by Sambasiva Suda. Thanks! [ruby-core:44408][ruby-trunk - Feature #6310] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl.cemboss2012-06-103-0/+27
| | | | | | | | | | | | | | | | | | | ext/openssl/ossl_pkey_rsa.c ext/openssl/ossl_pkey_dsa.c ext/openssl/ossl_pkey_ec.c: Forbid export passwords that are less than four characters long, as OpenSSL itself does not allow this. Issue found by Eric Hodel. * ext/openssl/ossl_pkey_ec.c: Add export as an alias of to_pem, following the PKey interface contract. * test/openssl/test_pkey_dsa.rb test/openssl/test_pkey_rsa.rb test/openssl/test_pkey_ec.rb: Add tests that assert correct behaviour when dealing with passwords that are less than four characters long. [ruby-core: 42281][ruby-trunk - Bug #5951] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ssl.c: Introduce SSLContext#renegotiation_cb andemboss2012-06-091-28/+6
| | | | | | | | | | | | | remove SSLContext#disable_client_renegotiation and related functionality introduced in r35797. The new callback approach gives clients maximum flexibility to decide on their own what to do on renegotiation attempts. Add documentation for SSL module and SSLError. * test/openssl/test_ssl.rb: Add a test for SSLContext#renegotiation_cb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: rb_id2strnobu2012-06-091-0/+8
| | | | | | | | | * iseq.c (iseq_load, insn_operand_intern, rb_iseq_disasm) (rb_iseq_parameters): use rb_id2str() instead of rb_id2name() to keep encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: fix conversionnobu2012-06-091-0/+7
| | | | | | * iseq.c (iseq_load): type is a symbol, and invalid as ID in common. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: realpathnobu2012-06-081-1/+1
| | | | | | | | | * test/runner.rb (src_testdir): expand real path so that TestGem#test_self_find_files does not fail by aliased load path when srcdir contains a symbolic link. * tool/runruby.rb (srcdir): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2012-06-061-0/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (try_with_sh): take envp argument.akr2012-06-061-0/+5
| | | | | | | | (exec_with_sh): ditto. use it for execve. (proc_exec_v): provide envp for try_with_sh. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_c_{struct_entry,union_entity}.rb: sorry, typos.usa2012-06-062-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Split one big test to seven tests.naruse2012-06-051-42/+75
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* obj_init_copynobu2012-06-051-0/+32
| | | | | | * object.c (rb_obj_init_copy): should check if trusted too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.nobu2012-06-052-68/+68
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't exec in the test process.akr2012-06-041-3/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_c_{struct,union}_entity.rb: broken require.usa2012-06-042-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_backtrace.rb: fix test.ko12012-06-041-14/+3
| | | | | | | | Windows path includes `:' character. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compatible loadernobu2012-06-041-0/+34
| | | | | | | | * marshal.c (r_object0): also load TYPE_USRMARSHAL, TYPE_DATA using compatible loader. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_proc_exec_e): extended version of rb_proc_exec() toakr2012-06-031-0/+12
| | | | | | | | | call execle(). (rb_proc_exec): use rb_proc_exec_e(). (rb_exec_err): use rb_proc_exec_e(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * use execve() to preserve environment variables when exec method isakr2012-06-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | failed. [ruby-core:44093] [ruby-trunk - Bug #6249] * include/ruby/intern.h (rb_exec_arg): add envp_str and envp_buf field to store envp of execve(). * process.c (proc_exec_v): takes envp_str as an argument and use it for execve(). (rb_proc_exec_ne): extended version of rb_proc_exec_n(). (rb_proc_exec_n): use rb_proc_exec_ne(). (rb_proc_exec): follow proc_exec_v() change. (fill_envp_buf_i): new function. (rb_exec_arg_fixup): set up envp_str and envp_buf. (save_env_i): removed. (save_env): removed. (rb_run_exec_options_err): don't modify environment variables. (rb_exec_err): use rb_proc_exec_ne(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* modified tests.tadf2012-06-032-8/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c: wrote Complex#_dump and Complex::load. But nowtadf2012-06-032-0/+4
| | | | | | | | | disabled (due to compatibility) [experimental]. * rational.c: wrote Rational#_dump and Rational::load. ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_marshal_load): [ruby-core:45394]tadf2012-06-032-0/+10
| | | | | | | * rational.c (nurat_marshal_load): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_backtrace.c: change names.ko12012-06-021-7/+15
| | | | | | | | | | | | | | | | | | | | | | | (1) Class name: RubyVM::FrameInfo -> RubyVM::Backtrace::Location. (2) Method name: RubyVM::FrameInfo.caller -> Kernel.caller_locations. (3) Instance methods of RubyVM::FrameInfo (RubyVM::Backtrace::Location) (3-1) name -> label (3-2) basename -> base_label (basename is confusing with File.basename) (3-3) line_no -> lineno (We have already similar name File#lineno, commented by kou [ruby-dev:45686]). (3-4) filename -> path. (3-5) filepath -> absolute_path. (3-5) iseq -> removed (we will make other APIs to access iseq and other information of frame for debugging). * test/ruby/test_backtrace.rb: apply above changes. And apply comment from kou [ruby-dev:45686]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add a test for r35863.naruse2012-06-021-0/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/struct.rb (DL::CStructEntity#set_ctypes): Refactoreddrbrain2012-05-311-0/+12
| | | | | | | | | | | #set_ctypes using newer ruby features to simplify its implementation. * test/dl/test_c_struct_entry.rb (class DL): Test to verify refactoring. Reviewed by Aaron Patterson. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_c_struct_entry.rb: Removed duplicated testdrbrain2012-05-311-5/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/struct.rb (DL::CStructEntity::size): Refactored ::sizedrbrain2012-05-311-0/+46
| | | | | | | | | | to remove unused variables and simplify using newer ruby features. * test/dl/test_c_struct_entry.rb: Test to validate refactoring Reviewed by Aaron Patterson git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/struct.rb (DL::CUnionEntity#set_ctypes): Refactoreddrbrain2012-05-301-0/+12
| | | | | | | | | | #set_types to reuse DL::CUnionEntity::size * test/dl/test_c_union_entity.rb: Added test Reviewed by Aaron Paterson git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/lib/dl/struct.rb (DL::CUnionEntity::size): Fixed ::size todrbrain2012-05-301-0/+18
| | | | | | | | | | return the size of the union. * test/dl/test_c_union_entity.rb: Test for DL::CUnionEntity::size Reviewed by Aaron Patterson git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* utc offset in secondsnobu2012-05-301-1/+1
| | | | | | | | * time.c (utc_offset_arg): utc offset can be precision in seconds. e.g. old Europe/Lisbon (c.f. [ruby-dev:40066]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: triple colons modifiernobu2012-05-291-0/+18
| | | | | | | | | | partially borrowed from ext/date. * strftime.c (rb_strftime_with_timespec): support GNU extension triple colons modifier. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: fix locale modifiernobu2012-05-291-0/+18
| | | | | | | | | | partially borrowed from ext/date. * strftime.c (rb_strftime_with_timespec): check conversion with locale modifier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: fix colon modifier.nobu2012-05-291-16/+20
| | | | | | | | | | partially borrowed from ext/date. * strftime.c (rb_strftime_with_timespec): colons are valid only for 'z' and must come just before it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warning: method redefined.naruse2012-05-291-0/+1
| | | | | | The warning cause test_singleton_method_added to fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_free): doesn't free a method table if it doesn'tnari2012-05-281-0/+14
| | | | | | | | exits. [ruby-dev:44436] * test/ruby/test_gc.rb (class TestGc): added the test case for this issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * untabified.nobu2012-05-271-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* modified test.tadf2012-05-271-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: fix for UNCnobu2012-05-261-0/+8
| | | | | | | | * file.c (realpath_rec): UNC prefix does not end with path separator, so new separator is needed after it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file.rb: fix for UNCnobu2012-05-261-2/+2
| | | | | | | | * test/ruby/test_file.rb (test_realpath, test_realdirpath): fix for UNC enabled platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_backtrace.rb (test_caller_lev):ko12012-05-261-1/+1
| | | | | | | | decreaze recursion size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (RubyVM::FrameInfo): add a class to access each frameko12012-05-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | information. You don't need to parse strings from caller(). FrameInfo has the following methods: FrameInfo#name: method name, class name, etc with decorations. FrameInfo#basename: name without decorations. FrameInfo#line_no: line number. FrameInfo#filename: file name. FrameInfo#filepath: full filepath. FrameInfo#iseq: iseq if it is iseq frame (defined by ruby script) FrameInfo#to_s: return caller() method style string. RubyVM::FrameInfoFrameInfo.caller(n, lev) returns array of FrameInfo objects. The name "RubyVM::FrameInfoFrameInfo.caller" is long and ambiguous (same as caller() method), we need to change the name before Ruby 2.0 release. Good names or comments are welcome. * test/ruby/test_backtrace.rb: add a test for above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ssl.c: Allow disabling client-side renegotiation.emboss2012-05-261-2/+42
| | | | | | | | | | | | | | | | | | | * test/openssl/test_ssl.rb: Simple tests for this. Client-side renegotiation is still considered problematic, even when used in the context of secure renegotiation (RI, RFC 5746). The changes allow users to either completely disable client renegotiation on the server, or to specify a maximum number of handshakes allowed in total. The number of total handshakes is counted in a callback set as SSL_set_info_callback. If the maximum number of handshakes is exceeded an error will be raised We do not support renegotiation in the OpenSSL extension, therefore this feature can only be tested externally. The feature is opt-in, the default setting will be to allow unlimited client renegotiation, as was the case before. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_ssl.rb: Clarify the intention of errors to beemboss2012-05-251-10/+13
| | | | | | | | | | expected. Two errors are possible when connection is refused due to a protocol version that was explicitly disallowed, OpenSSL::SSL::SSLError or Errno::ECONNRESET, depending on the OpenSSL version in use. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e