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

24603 Коммитов

Автор SHA1 Сообщение Дата
usa 53881a8c6d * io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is
set.  this is the one of the reason of IO writing slowness of Windows
  in 1.9.3 or later.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 05:52:32 +00:00
usa 1b79efbb39 * ChangeLog: commit miss of r33662.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 05:50:43 +00:00
naruse ce19ae0ef0 * ext/pty/pty.c (get_device_once): FreeBSD's posix_openpt doesn't
support O_CLOEXEC and fails if specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 02:03:57 +00:00
akr bd3b3c1b51 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07 21:01:40 +00:00
svn cb230eee02 * 2011-11-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07 17:48:17 +00:00
usa add77a592b * include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
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
2011-11-07 17:48:11 +00:00
akr 4764756497 * ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07 13:05:43 +00:00
akr 733a57b878 add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07 12:16:10 +00:00
tenderlove e115627a18 * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
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
2011-11-07 11:33:39 +00:00
tenderlove 8ff37e3901 * test/psych/test_yamlstore.rb: make test case inherit from MiniTest,
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
2011-11-07 11:27:27 +00:00
tenderlove a27349a4cb * test/psych/test_yamldbm.rb: Test case should inherit from MiniTest,
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
2011-11-07 11:22:22 +00:00
akr e4e5b7df4c * ext/dbm/extconf.rb: check dbm_pagfno() and dbm_dirfno().
* ext/dbm/dbm.c: use above to set close-on-exec flag.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07 11:17:17 +00:00
usa 66595f3894 * io.c (io_fflush): remove fsync().
* io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07 11:08:39 +00:00
akr 987c03a387 * io.c (rb_close_before_exec): use F_MAXFD if available.
F_MAXFD is available on NetBSD since NetBSD 2.0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07 10:44:02 +00:00
usa 8c492668a7 * test/ruby/test_io_m17n.rb
(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
2011-11-07 10:27:19 +00:00
svn 2522df9655 * 2011-11-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-06 16:18:31 +00:00
ayumin ae1943bee9 * lib/debug.rb: add help for 'pp' and 'r[estart]'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-06 16:18:26 +00:00
akr 5cb6365487 * ext/socket/rubysocket.h (rsock_recvmsg): declared.
* ext/socket/ancdata.c (rsock_recvmsg): extracted from
  nogvl_recvmsg_func.
  (nogvl_recvmsg_func): use rsock_recvmsg.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-06 05:51:43 +00:00
emboss 600fcacc75 * test/openssl/test_engine.rb: add test for engine cipher. RC4 is used
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
2011-11-05 18:33:37 +00:00
svn 273c900be8 * 2011-11-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 15:14:37 +00:00
akr df334f5277 * lib/test/unit.rb (Test::Unit::Options#non_options): options[:ruby]
should be an array.  This fixes
  "./ruby test/runner.rb test/testunit/test_parallel.rb"
  [ruby-dev:44782]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 15:14:33 +00:00
duerst 642562c707 insns.def: Some fixes and tweaks to English explanations
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 11:30:51 +00:00
akr 333c847f19 * io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if
fcntl(F_DUPFD) failed as fcntl(F_DUPFD_CLOEXEC).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 10:13:00 +00:00
akr a3521e0261 * ext/socket/socket.c (rsock_socketpair0): refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 09:06:05 +00:00
akr 385a7d4594 * ext/socket/init.c (rsock_socket0): don't clear try_sock_cloexec if
SOCK_CLOEXEC is not a reason for EINVAL.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 08:56:50 +00:00
ktsj c3749b6a6d * ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
  lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
  lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
  lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
  lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
  lib/shell/command-processor.rb, lib/shell/process-controller.rb,
  lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
  arguments to avoid creating Proc objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 07:37:47 +00:00
akr 0e68c46e2d * ext/socket/init.c (rsock_socket0): extract single socket() call with
CLOEXEC handling from rsock_socket.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 06:46:02 +00:00
svn d05202a596 * 2011-11-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 02:19:52 +00:00
akr df390d82f9 * ext/socket/socket.c (rsock_socketpair0): don't clear
try_sock_cloexec if SOCK_CLOEXEC is not a reason for EINVAL.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 02:19:48 +00:00
nobu 413f24d3b0 * whitespace cleanup.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-04 07:19:23 +00:00
nahi ab682d95e0 * ext/openssl/ossl_pkey_rsa.c (rsa_generate): [SECURITY] Set RSA
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
2011-11-04 05:12:31 +00:00
emboss 3463615a69 * test/openssl/test_engine.rb: add first tests for builtin "openssl"
engine.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-04 00:33:11 +00:00
emboss 00bfe1940e * ext/openssl/extconf.rb:
* ext/openssl/ossl_engine.c: add some missing OpenSSL engines.
  Thanks, Yui Naruse, for providing the patch!
  [Bug #5548] [ruby-core:40670]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 23:45:23 +00:00
usa 3e6ea9306c * win32/configure.bat: disable delayed expansion of enironment variable.
[Bug #5517] [ruby-core:40531]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 19:55:43 +00:00
usa a3ce319639 * io.c (make_writeconv): fixed typo of previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 19:06:43 +00:00
usa 102ec1171d * io.c (make_writeconv): fixed typo of previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 18:45:41 +00:00
usa 932d63efe0 * io.c (make_writeconv): unversal_newline converter is for reading.
so, if the io is text mode and has ECONV_UNIVERSAL_NEWLINE_DECORATOR
  flag, use crlf_newline converter for writing.
  this change fixes the problem about the luck of CR up Kernel.p and
  Kernel.puts to stdout/stderr on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 16:59:53 +00:00
naruse b2f90f4d51 * ext/readline/readline.c (Init_readline): like r18313, libedit's
replace_history_entry may use offset instead of which.
  so introduce history_replace_offset_func and initialize it.

* ext/readline/readline.c (hist_set): use history_replace_offset_func.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 16:23:58 +00:00
naruse 21ab6bc3fa * ext/readline/readline.c (Init_readline): fix wrong condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 15:54:19 +00:00
naruse a3ace91f3e Don't define tests if there is no psych.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 15:54:16 +00:00
svn dae4acbedd * 2011-11-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 15:19:28 +00:00
usa 5a2758ed1e * encoding.c (rb_locale_charmap): ignore calling nl_langinfo_codeset()
on Windows except cygwin. [experimental]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 15:19:24 +00:00
nobu ac46d76ce8 * thread.c (rb_fd_rcopy): suppress warnings on mingw32.
* win32/win32.c (overlapped_socket_io, recvmsg, sendmsg, dupfd):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 13:50:55 +00:00
akr b45c882aec * ext/socket/socket.c (rsock_socketpair0): extracted from
rsock_socketpair to set close-on-exec flag for each socketpair()
  call.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 13:46:41 +00:00
nagachika a0b22b1a39 * ext/socket/init.c (rsock_socket): set close-on-exec flag when
SOCK_CLOEXEC is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 13:14:48 +00:00
nagachika 8731a38bff * test/ruby/test_process.rb: clean up a garbage character.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 12:50:57 +00:00
akr 88f1b8cf0c add test for close-on-exec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 11:15:15 +00:00
akr df6a0fe8bb close a socket in test_socket_new.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 10:55:26 +00:00
svn cead180d3f * 2011-11-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-02 23:42:31 +00:00
emboss 576454a432 * test/openssl/test_engine.rb: call Engine::cleanup on exit.
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
2011-11-02 23:42:10 +00:00