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

24671 Коммитов

Автор SHA1 Сообщение Дата
usa 572e4807e6 * win32/win32.c (unixtime_to_filetime): should check the return value
of localtime().  reported by snowjail at gmail.com.
  [ruby-dev:44838] [Bug #5596]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 07:43:08 +00:00
ko1 9cd8b76e6d * cont.c (rb_fiber_m_transfer, rb_fiber_resume): prohibit using
"resume" after "transfer" method are used.  You should not mix
  "resume" fiber and "transfer" fiber.
  [Bug #5526]
* NEWS: add information about this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 04:26:39 +00:00
nobu b2c44e7af5 * template/Doxyfile.tmpl (INCLUDE_PATH): add srcdir and include.
[ruby-core:40843] [Bug #5597]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 02:40:39 +00:00
naruse b10c3136b0 * thread.c (do_select): fix cast, tv_sec is time_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 02:06:49 +00:00
nobu e120e37577 * configure.in: should not use test -e for portability.
[ruby-core:40841] [Bug #5594]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 01:32:25 +00:00
nobu f9188dea88 property
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09 01:32:12 +00:00
tenderlove 4c63e02740 * ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
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
2011-11-08 19:54:44 +00:00
svn 7bb2da2e2b * 2011-11-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 17:13:07 +00:00
naruse 3d855def9e FreeBSD 8.2 sticks this [ruby-dev:44726] [Bug #5524]
http://redmine.ruby-lang.org/issues/5524

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 17:13:03 +00:00
nobu 0e4c2ce841 * ext/dbm/dbm.c (fdbm_fetch, fdbm_key, fdbm_delete, fdbm_store)
(fdbm_has_key, fdbm_has_value): get rid of overflow.
* ext/gdbm/gdbm.c (rb_gdbm_fetch2, rb_gdbm_nextkey)
  (rb_gdbm_delete, fgdbm_store, fgdbm_has_key): ditto.
* ext/dbm/dbm.c (fdbm_delete_if): hide intermediate objects.
* ext/gdbm/gdbm.c (fgdbm_delete_if): ditto.
* ext/dbm/extconf.rb: check size of datum.dsize to get rid of
  overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 14:34:39 +00:00
naruse 4342469e8c * addr2line.c (PATH_MAX): define if not defined. [ruby-core:40840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 14:31:56 +00:00
nobu ebe0280253 * ext/tk/tcltklib.c (rb_thread_critical): fix type.
* ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core): int is
  enough for micro seconds.  may need to check overflow in the
  setter though.
* ext/tk/tcltklib.c (RSTRING_LENINT): check overflow if necessary.
* ext/tk/tcltklib.c (RbTk_ALLOC_N): wrapper for ckalloc() which
  takes an int.
* ext/tk/tcltklib.c (ip_ruby_cmd_receiver_get, tcltklib_compile_info):
  get rid overflow.
* ext/tk/tcltklib.c (tcltklib_compile_info): constified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 14:26:51 +00:00
akr ddb9acd9f8 * test/dbm/test_dbm.rb: split tests for read only database.
* test/gdbm/test_gdbm.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 11:51:28 +00:00
akr c2c0707949 * ext/pty/pty.c (MasterDevice): define only when used.
(SlaveDevice): ditto.
  (deviceNo): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 10:04:32 +00:00
nobu 4d36509054 * ext/-test-/old_thread_select/extconf.rb: ignore deprecated
declaration warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 09:02:59 +00:00
nobu 6bb4ddcba5 * include/ruby/ruby.h (rb_long2int): define as a macro always, so
that cpp conditionals can tell if it is provided.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 08:59:28 +00:00
nobu 7c7514b206 * lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp
cannot work.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 08:30:53 +00:00
naruse 452bf3b9c9 * ext/pty/pty.c (get_device_once): FreeBSD 8 supported O_CLOEXEC flag
for posix_openpt, but FreeBSD 9's posix_openpt doesn't support
  O_CLOEXEC and fails if specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 08:26:00 +00:00
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