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

5353 Коммитов

Автор SHA1 Сообщение Дата
nobu 38fd0dc668 symbol/type.c: bug_pindown
* ext/-test-/symbol/type.c (bug_pindown): method for debug, which
  pins down the given symbol.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-02 01:34:44 +00:00
nobu a80b300416 symbol/type.c: bug_static_p bug_dynamic_p
* ext/-test-/symbol/type.c (bug_static_p, bug_dynamic_p): methods
  for debug, which predicate the given symbol type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-02 01:34:41 +00:00
nobu b522335554 test_inadvertent_creation.rb: use Symbol.find
* ext/-test-/symbol/intern.c: Symbol.find is available now.

* test/-ext-/symbol/test_inadvertent_creation.rb (noninterned_name):
  use Symbol.find instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-30 15:16:07 +00:00
tadf bb05bcde01 * ext/date/date_strptime.c (date__strptime_internal): do not overwrite century.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-27 10:44:23 +00:00
nobu e923de6d4a ossl_asn1.c: fix undefined behavior
* ext/openssl/ossl_asn1.c (ossl_asn1_initialize): SYMID on a value
  other than Symbol is an undefined behavior.  fix up r31699.
  [ruby-core:62142] [Bug #9771]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-24 02:53:29 +00:00
akr 708e1bd49d * ext/etc/extconf.rb: Build ext/etc unconditionally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 11:53:07 +00:00
nobu 3254b0f3c1 win32ole.c: suppress warnings
* ext/win32ole/win32ole.c (ole_excepinfo2msg, lcid_installed):
  cast to suppress warnings, SCODE varies on cygwin and mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 04:14:42 +00:00
nobu 9036b58c99 win32ole.c: fix format
* ext/win32ole/win32ole.c (ole_excepinfo2msg, lcid_installed): fix
  format to suppress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 02:51:34 +00:00
nobu 2c14872b9f stringio.c: use rb_str_append other than ASCII-8BIT
* ext/stringio/stringio.c (strio_write): use rb_str_append to
  reuse coderange bits other than ASCII-8BIT, and keep
  taintedness.  [ruby-dev:48118] [Bug #9769]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 02:03:43 +00:00
nobu 3ec18aa23a stringio.c: move GC guard
* ext/stringio/stringio.c (strio_write): move GC guard after the
  last using position.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 02:03:35 +00:00
naruse 506c6f52b9 Revert r45670 "stringio.c: use rb_str_append"
It breaks test-all.
http://u64b.rubyci.org/~chkbuild/ruby-trunk/log/20140422T143301Z.diff.html.gz

rb_str_conv_enc() return original string for example when
from ASCII-8BIT to UTF-8 with non ASCII strings

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 18:44:48 +00:00
nobu a197581765 stringio.c: use rb_str_append
* ext/stringio/stringio.c (strio_write): use rb_str_append to
  reuse coderange bits and keep taintedness.
  [ruby-dev:48118] [Bug #9769]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 14:14:30 +00:00
naruse c71019f888 * ext/-test-/string/coderange.c: add Bug::String.new#coderange_scan
to explicitly scan coderange.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-21 10:14:46 +00:00
nobu 90e393b368 stringio.c: non-ascii encoding
* ext/stringio/stringio.c (strio_putc): fix for non-ascii
  encoding, like as IO#putc.  [ruby-dev:48114] [Bug #9765]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-21 05:11:50 +00:00
nobu 24252ff434 win32ole.c: suppress warnings
* ext/win32ole/win32ole.c: use LONG instead of long to suppress
  incompatible pointer warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-20 00:12:15 +00:00
nobu 6a8d00496a ossl_x509name.c: null-terminate field name
* ext/openssl/ossl_x509name.c (ossl_x509name_add_entry): field
  name of X509_NAME_add_entry_by_txt() must be NULL-terminated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-18 11:46:04 +00:00
nobu 549e0e488e zlib.c: return unshared string
* ext/zlib/zlib.c (zstream_shift_buffer): create new copied string
  since it cannot be shared ever.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-18 11:46:02 +00:00
nobu a39b88d2fd ossl_pkey.c: fix memory leak
* ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
  finalizes only a copy of the digest context, the context must be
  cleaned up after initialization by EVP_MD_CTX_cleanup() or a
  memory leak will occur.  [ruby-core:62038] [Bug #9743]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 00:51:18 +00:00
akr 07b12e1ee2 * ext/extmk.rb: Re-generate extmk.mk and dummy makefiles only if
really required.
  This fixes a problem to run multiple test-all concurrently as:
  make test-all & make test-all & make test-all & ...


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-15 10:29:01 +00:00
akr 9aa67e267b * bignum.c (SIZEOF_BDIGIT): Renamed from SIZEOF_BDIGITS.
* internal.h: Ditto.

* marshal.c: Ditto.

* rational.c: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-13 03:48:17 +00:00
hsbt 3a78169e3f * ext/psych/lib/psych.rb: [DOC] Fix a dead link in Psych by @rochefort [ci skip][fix GH-593]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-13 00:59:40 +00:00
drbrain ccaf4229cc Remove unneeded OCSP constant macros
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-12 00:37:03 +00:00
nobu dfadac81fe * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-12 00:36:06 +00:00
drbrain d329484a5d * ext/openssl/ossl_ocsp.c: [DOC] Document OpenSSL::OCSP.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-12 00:35:01 +00:00
nobu 2291ff2eaa ossl.c: OPENSSL_LIBRARY_VERSION
* ext/openssl/ossl.c (Init_openssl): add constant OPENSSL_LIBRARY_VERSION
  which tells the version running OpenSSL.  [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-09 08:27:56 +00:00
akr 1aa54bebaf * ext/socket/socket.c (sock_s_getnameinfo): Save errno for EAI_SYSTEM.
Reported by Saravana kumar.  [ruby-core:61820] [Bug #9697]
  Fixed by Heesob Park.  [ruby-core:61868]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-07 12:14:29 +00:00
nobu a237db5cbc dln.c: non-ascii path on Windows
* dln.c (dln_load): use wchar version to load a library in
  non-ascii path on Windows.  based on the patch by Bugra Barin
  <bugrabarin AT hotmail.com> in [ruby-core:61845].  [Bug #9699]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-05 23:52:52 +00:00
tadf cce3aa754b * ext/date/date_core.c (d_lite_cmp): should compare with #<.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-05 10:53:16 +00:00
nobu d2a8e28597 readline/extconf.rb: rl_hook_func_t
* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
  [ruby-dev:48089] [Bug #9702]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-04 15:31:23 +00:00
kazu 60d4fc9f68 Fix error with empty args.
* ext/pathname/lib/pathname.rb (Pathname#join): Fix error with
  empty args. Reported by ko1 via IRC.

* test/pathname/test_pathname.rb (TestPathname#test_join): Add the
  test for above case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-02 02:51:20 +00:00
nobu 6648136779 readline/extconf.rb: fix typo
* ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`.
  [ruby-core:61756] [Bug #9578]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-31 14:57:47 +00:00
nobu afb4bcbfd6 struct.c: not_a_member message
* struct.c (not_a_member): extract name error and use same error
  messages.  based on the patch by Marcus Stollsteimer <sto.mar AT
  web.de> at [ruby-core:61721].  [Bug #9684]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-28 10:32:16 +00:00
hsbt 7a01bfcdba * ext/psych/psych.gemspec: update gemspec for psych-2.0.5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-28 00:23:13 +00:00
hsbt e221c6cefc * ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to
libyaml-0.1.6 for CVE-2014-2525.
* ext/psych/yaml/config.h: ditto.
* ext/psych/yaml/scanner.c: ditto.
* ext/psych/yaml/yaml_private.h: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-28 00:19:15 +00:00
nobu 1dd527012b thread.c: undumpable
* ext/thread/thread.c (undumpable): ConditionVariable and Queue
  are not dumpable.  [ruby-core:61677] [Bug #9674]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26 02:20:26 +00:00
kazu 6df5f314ac remove unnecessary unshift
* ext/pathname/lib/pathname.rb (Pathname#join): remove unnecessary unshift.
* test/pathname/test_pathname.rb (TestPathname#test_join): add tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25 14:42:36 +00:00
nobu 3981d60ba2 dl/extconf.rb: check for -fno-defer-pop option
* ext/dl/extconf.rb: check for -fno-defer-pop option, since clang
  5.1 no longer support -fno-defer-pop option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-20 03:21:52 +00:00
nobu d90075cb10 json/parser/prereq.mk: use enum
* ext/json/parser/prereq.mk (parser.c): use `enum` instead of
  `static const int` to get rid of unused-const-variable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-17 04:57:19 +00:00
nobu 6224216294 unused functions and variables
* complex.c, rational.c: remove unused functions, which are warned
  by clang 5.1, and also variables only used by removed functions.

* ext/date/date_core.c: ditto.

* enc/utf_16be.c, enc/utf_16le.c: comment out constants only used
  by commented out functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-17 04:57:14 +00:00
ktsj 1cde307767 * ext/.document: remove refinement from documentable directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-15 09:56:43 +00:00
usa 1df0e183dd * ext/-test-/win32/dln/libdlntest.c (dlntest_ordinal): no need to
specify export in the source file because .def file do it.
  get rid of warning on linking.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-13 14:52:19 +00:00
ktsj c1f1b93171 * ext/.document: add objspace/objspace_dump.c to document file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11 13:33:31 +00:00
charliesome c8c539a198 ext/objspace: Check fptr before trying to dump FILE object fd
Patch by Scott Francis. Closes GH-562.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-10 21:55:51 +00:00
nobu dfdb8b7372 fiddle/function.c: fix memory leak on exception
* ext/fiddle/function.c (function_call): fix memory leak when an
  exception occurs at argument conversion or the function call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-09 04:51:38 +00:00
nobu 1692e54793 fiddle/function.c: check argument size
* ext/fiddle/function.c (initialize): check argument number if the
  temporary buffer exceeds size_t max.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-09 04:51:17 +00:00
nobu ff84a6a2e7 ext/dl, ext/fiddle: fix memory leak
* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
  ext/fiddle/handle.c (fiddle_handle_free),
  ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
  based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-08 04:46:57 +00:00
emboss 699b209cf8 * lib/openssl/ssl.rb: Explicitly whitelist the default
SSL/TLS ciphers. Forbid SSLv2 and SSLv3, disable
  compression by default.
  Reported by Jeff Hodges.
  [ruby-core:59829] [Bug #9424]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-06 01:43:53 +00:00
nobu 89e70fe8e7 ossl.c: NULL check
* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
  error reasons with old OpenSSL, and insert a colon iff formatted
  message is not empty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-05 02:58:59 +00:00
ktsj df0991f34b * ext/pathname/lib/pathname.rb (Pathname#find): add "ignore_error"
keyword argument defaulted to true as well as Find#find.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-04 15:44:53 +00:00
normal fd61a78303 use do/while(0) around GetDBM macros
* README.EXT: wrap GetDBM with do/while(0)
* README.EXT.ja: ditto
* ext/dbm/dbm.c: ditto, likewise for GetDBM2
* ext/gdbm/gdbm.c: ditto
* ext/sdbm/init.c: ditto
  [ruby-core:61217]

ref: http://c-faq.com/cpp/multistmt.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02 22:50:31 +00:00