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

4363 Коммитов

Автор SHA1 Сообщение Дата
akr 37a1355bf8 * include/ruby/intern.h (rb_exec_arg_init): deprecated.
(rb_exec_arg_addopt): ditto.
  (rb_exec_arg_fixup): ditto.
  (rb_run_exec_options): ditto.
  (rb_run_exec_options_err): ditto.

* internal.h (rb_execarg_init): declared.
  (rb_execarg_addopt): ditto.
  (rb_execarg_fixup): ditto.
  (rb_execarg_run_options): ditto.

* process.c: call rb_execarg_addopt, rb_execarg_fixup,
  rb_execarg_run_options, rb_execarg_init.
  (rb_execarg_addopt): renamed from rb_exec_arg_addopt.
  (rb_exec_arg_addopt): stub to call rb_execarg_addopt.
  (rb_execarg_init): renamed from rb_exec_arg_init.
  (rb_exec_arg_init): stub to call rb_execarg_init.
  (rb_execarg_fixup): renamed from rb_exec_arg_fixup.
  (rb_exec_arg_fixup): stub to call rb_execarg_fixup.
  (rb_execarg_run_options): renamed from rb_run_exec_options_err.
  (rb_run_exec_options_err): stub to call rb_execarg_run_options.
  (rb_run_exec_options): call rb_execarg_run_options.

* io.c: call rb_execarg_addopt, rb_execarg_fixup,
  rb_execarg_run_options, rb_execarg_init.

* ext/pty/pty.c (establishShell): call rb_execarg_init and
  rb_execarg_fixup.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 11:34:51 +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 43759fc1ed * lib/openssl/ssl.rb: Use a simple random number to generate the
session id. MD5, as was used before, causes problems when
  using a FIPS version of OpenSSL. Issue was found by Jared
  Jennings, thank you!
  [ruby-trunk - Bug #6137]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 01:53:20 +00:00
akr 18088467e7 * process.c (rb_exec_async_signal_safe): exported.
* ext/pty/extconf.rb: modify $INCFLAGS to include internal.h

* ext/pty/pty.c: include internal.h.
  (chfunc): don't call rb_thread_atfork_before_exec.  use
  rb_exec_async_signal_safe instead of rb_f_exec.
  (establishShell): set up earg.  use rb_fork_async_signal_safe
  instead of rb_fork_err.

* internal.h (rb_exec_async_signal_safe): declared.
  (rb_fork_async_signal_safe): declared.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 01:29:58 +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 21f1af2ec2 * ext/openssl/ossl.c: Fix error in example. Patch by David Albert.
Add/extend existing documentation. Examples now also cover RSA 
  signatures and PBKDF2.
  [ruby-core: 45154][ruby-trunk - Bug #6475]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-09 18:16:18 +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 182dc9d40d process.c, ext/pty/pty.c: status on errors
* process.c (rb_fork_err): determine status on errors.
* ext/pty/pty.c (establishShell): reraise exception if something
  raised during sleep.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-08 02:26:39 +00:00
nobu bc81a19e99 ext/pty/pty.c: status to protect
* ext/pty/pty.c (establishShell): now needs status to protect from
  exceptions in rb_fork_err().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-08 02:25:55 +00:00
naruse efebb5b157 Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 05:02:27 +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
tadf 1ddb6f7059 * ext/date/date_core.c: checks whether the object is frozen or not.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 05:14:47 +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 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
drbrain 2e87e2150e * ext/dl: Added documentation. Patch by Vincent Batts.
[ruby-trunk - Bug #6496]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-30 22:48:42 +00:00
mrkn d3a349bbc3 * ext/bigdecimal/lib/bigdecimal/jacobian.rb,
ext/bigdecimal/lib/bigdecimal/newton.rb:
  fix documentation comments.
  Patch by alperakgun from github.com/shyouhei/ruby/pull/8

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-30 07:30:46 +00:00
mrkn ecb6bd90c0 * ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian#dfdxi):
fix jacobian to get stuck in an infinite loop when a solution is not
  found due to forget to increment nRetry counter.
  Patch by alperakgun from github.com/shyouhei/ruby/pull/8

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-30 07:26:51 +00:00
tadf 83d8d057c2 * ext/date/date_strftime.c: allows %Ok and %Ol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 01:04:41 +00:00
tadf 6ba96bbe4e * ext/date/date_core.c: modified doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 00:30:33 +00:00
tadf 76547ea75f * ext/date/date_core.c: added description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 10:05:25 +00:00
tadf 43e8bf0c27 re-modified
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 09:21:21 +00:00
tadf 2199c85dd6 * ext/date/date_strftime.c: reduced the code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 09:16:26 +00:00
tadf 0976f31200 * time.c: modified doc.
* ext/date/date_core.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 09:10:42 +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
emboss 913827b6af * ext/openssl/ossl_ssl.c: Revert r35583
* test/openssl/test_ssl.rb: Handle ECONNRESET in code instead to avoid
the test failing in Ruby CI [1]
	
[1] http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz#test-all


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25 13:24:47 +00:00
usa 67075af600 * trunk/ext/-test-/printf/printf.c: change function names because of
conflict with msvcrt.  fixed build error of mswin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25 07:13:03 +00:00
nobu 26f96fe1ce * test/-ext-/test_printf.rb: tests for [Feature #5896].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25 02:20:36 +00:00
nobu b0dd250dc9 use RB_TYPE_P() instead of comparison of TYPE()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23 07:13:21 +00:00
knu 05b26a85b8 * ext/syslog/syslog.c: Classify constants and macros into several
sub-modules. (Syslog::Priority, Syslog::Level, Syslog::Option
  and Syslog::Macros)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 07:18:49 +00:00
knu 28fc368955 * ext/syslog/syslog.c (mSyslog_inspect): Use rb_sprintf().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 07:18:47 +00:00
knu 1b84082a61 * ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
module before calling rb_class2name().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 07:18:43 +00:00
nobu 03570f8091 ext/extmk.rb: workaround for -framework option
* ext/extmk.rb (extmake): assume non-option words are arguments.
  workaround for -framework option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20 15:58:03 +00:00
nobu e95d690380 ext/extmk.rb: reopen stdout
* ext/extmk.rb (extmake): reopen $stdout to NULL, since setting
  $stdout cannot affect child processes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20 14:00:15 +00:00
nobu 2dc01a5f2f ext/extmk.rb: Shellwords.join
* ext/extmk.rb (system): use Shellwords.join.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20 14:00:13 +00:00
nobu a906a9d9be Bug #6462: EXTSOLIBS
* Makefile.in (LIBRUBY_SO): link EXTSOLIBS too.
* ext/extmk.rb (mf.macro): use EXTSOLIBS instead of SOLIBS to get rid
  of discard libraries needed by default.  [Bug #6462]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20 03:25:14 +00:00
nobu 9373d91585 suppress unused-but-set-variable warnings
* ext/curses/curses.c (window_cury, window_curx, window_maxy)
  (window_maxx, window_begy, window_begx): suppress
  unused-but-set-variable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-19 10:13:32 +00:00
nobu 15bf3182c6 static-linked-ext: all linked ruby
* ext/extmk.rb (command_output): ENCOBJS is needed for all linked
  ruby, if --disable-shared and --with-static-linked-ext.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-19 10:04:40 +00:00
nobu a99bf256ff static-linked-ext: into libruby
* ext/extmk.rb (command_output): dmyext is needed as DLDOBJS if no
  static lined extensions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-19 05:57:32 +00:00
nobu 0e60b2c6a3 static-linked-ext: into libruby
* Makefile.in, common.mk (PROGRAM): no extension libraries.
* common.mk (build-ext): pass macros for libruby.so.
* ext/extmk.rb (command_output): link extension libraries and encoding
  libraries into libruby.so, not ruby executable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-19 02:37:21 +00:00
nobu 1a6b07d716 ext/extmk.rb: fold long macro
* ext/extmk.rb (command_output): fold long macro lines.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-19 02:36:25 +00:00
kosaki 54872dd7b3 * ext/openssl/extconf.rb: Use Logging::message instead of message.
* ext/zlib/extconf.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18 19:51:58 +00:00
nobu c7c7dfd2fc ext/extmk.rb: link archives only
* ext/extmk.rb (extmake): link archives only, skip script only
  extension libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18 08:41:02 +00:00
nobu c196e22a42 Revert r35684 "* trunk/ext/json/extconf.rb: remove fake file."
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18 08:26:10 +00:00
kosaki 69305da74d * ext/zlib/extconf.rb: Use an exception instaed of bare puts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18 07:02:56 +00:00
kosaki 2e4645ca16 * ext/psych/extconf.rb: Use an exception instaed of bare abort.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18 07:02:39 +00:00
kosaki 6074032ae6 * ext/fiddle/extconf.rb: Use an exception instaed of bare abort.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18 07:02:25 +00:00
kosaki 522627d5cc * ext/readline/extconf.rb: Use an exception instead of bare exit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18 07:02:10 +00:00