Граф коммитов

4665 Коммитов

Автор SHA1 Сообщение Дата
nobu 7690aab833 test/readline/test_readline.rb: fix argument order
* test/readline/test_readline.rb (TestReadline#test_pre_input_hook)
  (TestReadline#test_insert_text): fix argument order.  expectd value
  should come first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 15:38:22 +00:00
nobu ff49900ab4 lib/test/unit.rb: format workers results in the parent
* 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
2012-06-15 22:46:08 +00:00
akr a29bdaf63f add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 14:00:33 +00:00
ngoto bff44ef4cd * test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_T
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
2012-06-13 13:52:04 +00:00
akr 94b275c5b3 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 12:44:26 +00:00
akr 640e0a33b7 * process.c (rb_exec_fillarg): treat '=' character as an meta
character to detect assignments preceding command name.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 12:41:08 +00:00
akr 05a98ce736 update tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 12:58:55 +00:00
nobu d9f3198dd9 * test/ruby/test_iseq.rb (TestISeq#test_disasm_encoding): set default
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
2012-06-10 06:49:16 +00:00
akr 258716bd9d * process.c (rb_fork_internal): call after_fork only unless
chfunc_is_async_signal_safe.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 02:45:38 +00:00
emboss 3ffd8a918f * ext/openssl/ossl_pkey_ec.c
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
2012-06-10 02:38:40 +00:00
emboss 5bd7899b98 * ext/openssl/ossl.c
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
2012-06-10 01:23:21 +00:00
emboss 14ba7fab58 * ext/openssl/ossl_ssl.c: Introduce SSLContext#renegotiation_cb and
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
2012-06-09 16:44:12 +00:00
nobu a1d6532ef6 iseq.c: rb_id2str
* 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
2012-06-09 14:36:56 +00:00
nobu 588d10180f iseq.c: fix conversion
* 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
2012-06-09 08:21:52 +00:00
nobu 2696fb9503 test: realpath
* 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
2012-06-08 07:19:38 +00:00
akr 78d7def619 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-06 12:11:45 +00:00
akr 7685837427 * process.c (try_with_sh): take envp argument.
(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
2012-06-06 11:09:26 +00:00
usa 5e1e5d04ee * test/dl/test_c_{struct_entry,union_entity}.rb: sorry, typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-06 00:46:12 +00:00
naruse 1c4e6066be Split one big test to seven tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 20:10:50 +00:00
nobu 2073258a7d obj_init_copy
* 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
2012-06-05 11:13:18 +00:00
nobu ff3b2cb1ce * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 01:29:43 +00:00
akr 9ab2ce20b3 don't exec in the test process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 12:52:35 +00:00
usa 00e4c2e362 * test/dl/test_c_{struct,union}_entity.rb: broken require.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 04:10:44 +00:00
ko1 2e7c769633 * test/ruby/test_backtrace.rb: fix test.
Windows path includes `:' character.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 03:04:34 +00:00
nobu 81a0c608eb compatible loader
* 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
2012-06-04 02:40:30 +00:00
akr 033e2187c6 * process.c (rb_proc_exec_e): extended version of rb_proc_exec() to
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
2012-06-03 11:12:20 +00:00
akr f4f28bf75f * use execve() to preserve environment variables when exec method is
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
2012-06-03 08:29:48 +00:00
tadf 5dc5a52612 modified tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 05:17:38 +00:00
tadf bdc55aa0c6 * complex.c: wrote Complex#_dump and Complex::load. But now
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
2012-06-03 05:05:29 +00:00
tadf 89ae71d721 * complex.c (nucomp_marshal_load): [ruby-core:45394]
* rational.c (nurat_marshal_load): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 01:26:41 +00:00
ko1 f6f769d26d * vm_backtrace.c: change names.
(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
2012-06-02 16:46:08 +00:00
naruse d054eb9631 Add a test for r35863.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-02 13:44:02 +00:00
drbrain fe962cde15 * ext/dl/lib/dl/struct.rb (DL::CStructEntity#set_ctypes): Refactored
#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
2012-05-31 22:07:09 +00:00
drbrain 711c067eb5 * test/dl/test_c_struct_entry.rb: Removed duplicated test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-31 00:37:45 +00:00
drbrain 40cf3e0cca * ext/dl/lib/dl/struct.rb (DL::CStructEntity::size): Refactored ::size
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
2012-05-31 00:27:34 +00:00
drbrain 0381ab0769 * ext/dl/lib/dl/struct.rb (DL::CUnionEntity#set_ctypes): Refactored
#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
2012-05-30 23:41:07 +00:00
drbrain f1cb6ea08f * ext/dl/lib/dl/struct.rb (DL::CUnionEntity::size): Fixed ::size to
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
2012-05-30 23:20:29 +00:00
nobu 18805586d9 utc offset in seconds
* 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
2012-05-30 01:58:34 +00:00
nobu 39a3d1793b strftime.c: triple colons modifier
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
2012-05-29 08:28:13 +00:00
nobu 241902e709 strftime.c: fix locale modifier
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
2012-05-29 08:28:09 +00:00
nobu 60683816be strftime.c: fix colon modifier.
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
2012-05-29 08:28:04 +00:00
naruse 44ae75a127 Suppress warning: method redefined.
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
2012-05-29 00:52:41 +00:00
nari e2f4f34467 * gc.c (obj_free): doesn't free a method table if it doesn't
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
2012-05-28 03:12:33 +00:00
nobu a000c52b83 * untabified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 02:23:14 +00:00
tadf 9f698ff1d5 modified test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 01:05:31 +00:00
nobu 5212b7fb52 file.c: fix for UNC
* 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
2012-05-26 07:26:36 +00:00
nobu 62bab7fc22 test/ruby/test_file.rb: fix for UNC
* 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
2012-05-26 07:24:59 +00:00
ko1 9c3d8bb0f2 * test/ruby/test_backtrace.rb (test_caller_lev):
decreaze recursion size.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 06:31:31 +00:00
ko1 4f54d4710e * vm.c (RubyVM::FrameInfo): add a class to access each frame
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
2012-05-26 04:49:23 +00:00
emboss 50ba64ab87 * ext/openssl/ossl_ssl.c: Allow disabling client-side renegotiation.
* 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
2012-05-26 00:56:33 +00:00