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

16164 Коммитов

Автор SHA1 Сообщение Дата
kosaki b1329e3b63 * configure.in: rlim_t use standard RUBY_REPLACE_TYPE mechanism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 14:47:27 +00:00
kosaki beed971728 * process.c (proc_setmaxgroups): added negative value check.
This was suggested by Daniel Berger. Thanks Daniel!
  [ruby-core:35426][Bug#4467]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 14:28:02 +00:00
kosaki aca674c2e7 * process.c (maxgroups, proc_setmaxgroups): increase max groups
limitation up to 65536.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 14:21:31 +00:00
akr dd9f5e8714 * ext/openssl/ossl_pkey_ec.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 13:21:31 +00:00
kosaki 97f07f0968 * sample/list.rb (MyElem#initialize): initialize @head
explicitely. Otherwise -W2 option makes following warning.
  "warning: instance variable @head not initialized".
  This issue was founded by Andrew Grimm. Thanks Andrew!
  [ruby-core:35435][Bug#4471]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 12:51:17 +00:00
naruse 18f4f08885 * class.c: fix camelCase to snake_case in documentation code examples.
patched by Andrew Grimm. fixes Bug #4469

* marshal.c: ditto.

* proc.c: ditto.

* sample/biorhythm.rb: ditto.

* vm_eval.c: ditto.

* vm_method.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-05 20:25:08 +00:00
kosaki b2a8d109b6 * io.c (io_cntl): use rb_thread_io_blocking_region() instead
rb_thread_blocking_region().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-05 18:23:55 +00:00
nagachika eaf08203dd * include/ruby/intern.h: fix a typo of prototype declaration.
rb_mutex_try_lock -> rb_mutex_trylock [ruby-dev:43213]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-05 13:59:21 +00:00
kosaki a474b0e3f7 * test/ruby/test_io.rb (TestIO#test_fcntl_lock): small clean up.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-05 10:45:01 +00:00
kosaki c0359f8176 * io.c (io_cntl, nogvl_io_cntl): IO.fcntl() and IO.ioctl()
release GVL during calling kernel interface.
  Suggested by Eric Wong. [ruby-core:35417][Bug #4463]

* test/ruby/test_io.rb (TestIO#test_fcntl_lock): add new test for
  IO.fcntl().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-04 16:38:34 +00:00
nagachika 118a5bcf96 * test/testunit/test_parallel.rb
(test_should_run_all_without_any_leaks): consider that the order of
    testcase could change. [ruby-dev:43300] [Bug #4466]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-04 14:20:23 +00:00
kosaki ff07709777 * io.c (io_cntl): change 'cmd' type to int. ioctl and fcntl need to
be passed int.
* io.c (rb_io_ctl): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-04 13:02:45 +00:00
kosaki 62374161f1 * configure.in: save warnflags. the patch is created by Eric Wong.
[Bug #4465]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-04 12:16:45 +00:00
akr 27bb573c06 * ext/openssl/ossl_pkey_dsa.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-03 22:18:50 +00:00
usa 4f8f4a9ee4 * process.c (check_exec_redirect_fd, check_exec_redirect): raise
ArgumentError if fd >= 3 on Windows because the feature is not
  supported.

* test/ruby/test_process.rb (test_execopts_redirect): remove meaningless
  argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-03 13:13:10 +00:00
usa 0ebf520671 * test/ruby/test_process.rb (test_execopts_redirect): redirecting fd
>= 3 is not supported on Windows, so should not specify such options
  when calling spawn or others.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-03 12:23:44 +00:00
naruse 1890364e90 * string.c (rb_str_slice_bang): raise error when the string is frozen.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-03 09:59:51 +00:00
naruse 7bb73a0852 * strftime.c (STRFTIME): return 0 and ERANGE when precision is too
large. [ruby-dev:43284] fixes #4456

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-03 05:28:00 +00:00
naruse 6a288deabc * addr2line.c (uleb128): cast the value to unsigned long.
* addr2line.c (fill_lines): print error when lseek fails.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 16:14:32 +00:00
naruse f25ff846f6 * lib/rexml/encoding.rb (REXML::Encoding#encoding=): store @encoding
a String which means the name of the encoding.
  this partially revert r29646.

* lib/rexml/document.rb: follow above.

* lib/rexml/output.rb: ditto.

* lib/rexml/parsers/baseparser.rb: ditto.

* lib/rexml/source.rb: ditto.

* lib/rexml/xmldecl.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 15:36:48 +00:00
nobu cddcffb8f9 * string.c (str_byte_substr): return nil for negative length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 14:20:06 +00:00
akr e1e8297a76 * ext/openssl/ossl_pkey_dh.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 12:15:50 +00:00
sorah 31fcc22365 * lib/test/unit/parallel.rb: Fix name from `inclement_io` to
`increment_io`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 05:29:52 +00:00
naruse a991a12cbc * string.c (rb_str_slice_bang): move treatments which is only needed
when the result is not nil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 05:09:37 +00:00
sorah 888362cc85 * test/testunit/test_parallel.rb(TestParallel#spawn_runner):
Fix outputing empty line in running test.

* test/testunit/tests_for_parallel/test_third.rb: Remove `sleep`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 05:06:43 +00:00
akr 66541b9a83 * ext/openssl/ossl_pkey.h: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 13:29:41 +00:00
sorah 39f90db925 * lib/test/unit/parallel.rb: Fix number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 13:05:17 +00:00
sorah 0a9442983d * lib/test/unit/parallel.rb: For Windows.
* test/testunit/test_parallel.rb(TestParallelWorker#test_quit_in_test):
  Fix for above specification change.
* test/testunit/test_parallel.rb(TestParallel#spawn_runner):
  Fix outputing empty line in running test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 12:54:39 +00:00
kosaki af3e36158f * test/ruby/test_system.rb (TestSystem#test_system_at):
remove tests for [bug#4396]. because we decided to reject this
  ticket.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 11:56:06 +00:00
tadf b8bc68113a * test/date/{test_date.rb,test_date_attr.rb}: [ruby-dev:43280]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 10:48:23 +00:00
ryan 25a9b62d45 Import rubygems 1.6.0 (released version @ 58d8a0b9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 09:41:32 +00:00
usa 86bb0af7ea * win32/win32.c: revert r30987 because it causes some failures in
test-all, especially webrick.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 07:23:37 +00:00
naruse 6016591e1c * string.c (rb_str_byteslice): the resulted encoding should keep
original encoding. this also fixes the encoding when the result
  shares internal string. [ruby-core:35376]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 07:02:08 +00:00
mrkn f83651ac30 * ext/bigdecimal/bigdecimal.c (VpMemAlloc): CVE-2011-0188.
Fixes a bug reported by Drew Yao <ayao at apple.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 04:40:49 +00:00
naruse b8b48f9d58 * string.c (rb_str_byteslice): Add String#byteslice. [ruby-core:35376]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 01:35:17 +00:00
arton e59654c24b * include/ruby/win32.h: define WIN32 if neither _WIN64 nor WIN32 defined. it forces to use push/pop for pack(4) pragma.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 15:15:32 +00:00
nagachika 667833711b * test/testunit/test_rake_integration.rb (test_with_rake_runner):
use assert_in_out_err for suppress messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 14:56:01 +00:00
kosaki 4a57c5e7d9 * win32/win32.c (rb_w32_spawn): use shell if a commandline contain
double-quote character.
* win32/win32.c (is_internal_cmd): similar, use shell if a commandline
  contain caret character.

* test/ruby/test_system.rb (TestSystem#test_system_at): fix
  wrong test case. if system() invoke a command by using shell,
  system() never return nil. Also, "" quotation must not appear
  twice in a command line.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 13:52:58 +00:00
akr c1f400917a * ext/openssl/ossl_pkcs7.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 08:37:24 +00:00
akr c0c182bf88 * ext/openssl/ossl_pkcs12.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 07:49:06 +00:00
naruse 4960e66ab6 * string.c (tr_trans): when the hash for multibyte repl is empty,
tr is inverse mode, and a character doesn't much the table, the
  character should be replaced by last replacement. Bug #4449

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 07:46:49 +00:00
akr 3fec2bee37 * ext/openssl/ossl_ocsp.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 07:46:16 +00:00
shyouhei b38b837066 * lib/tempfile.rb: Fix example file paths in docs for tempfile.
https://github.com/ruby/ruby/pull/5


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 04:16:16 +00:00
shyouhei 1c4c00a326 * ext/openssl/ossl_cipher.c (ossl_cipher_init): typo fix.
https://github.com/ruby/ruby/pull/8


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 03:59:12 +00:00
usa 5d881f0fd4 * ext/date/date_core.c (datetime_s_now): localtime() and localtime_r()
required time_t pointer as 1st parameter, and tv_sec member of struct
  timeval is long.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 03:28:24 +00:00
sorah 18c34c6c92 * test/testunit/test_parallel.rb: Temporally disable test on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 02:58:35 +00:00
sorah 04ccb2fee2 * lib/test/unit.rb(Test::Unit::Runner#after_worker_quit):
method name more be natural English.
* lib/test/unit.rb(Test::Unit::Runner::Worker.launch):
  IO.sync doesn't need. Should use "b" for mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-27 22:40:53 +00:00
kosaki f0f7079d48 * test/ruby/test_system.rb (TestSystem#test_system_redirect_win):
add test for system().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-27 13:03:01 +00:00
sorah c6598ffcae * lib/test/unit.rb: Refactoring; Worker never use Hash for internal storage.
* lib/test/unit.rb: Never use Kernel#spawn. Use IO.popen instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-27 09:03:16 +00:00
akr 92ba80cc4a * ext/openssl/ossl_ns_spki.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-27 04:17:09 +00:00