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

4163 Коммитов

Автор SHA1 Сообщение Дата
akr d7bf156afd * ext/dbm/extconf.rb: show header and library found.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19 14:44:24 +00:00
akr 95f3f9829f * ext/dbm/dbm.c (Init_dbm): refine DBM::VERSION definition.
* ext/dbm/extconf.rb: provide RUBYDBM_GDBM_HEADER macro.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19 14:02:14 +00:00
akr 0187905af2 * ext/dbm/extconf.rb: detect GDBM's ndbm.h by testing dbm_clearerr is
an empty macro.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 16:06:52 +00:00
akr fcd8f78ea3 * ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
is available since GDBM 1.9 because 'gdbm_compat' is appropriate
  choise since GDBM 1.8.1.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 15:31:09 +00:00
akr fc0111cce1 * ext/dbm/extconf.rb (dblib): prefer recent GDBM over older GDBM.
(have_declared_libvar): new function to check a declared variable
  exists in a library.
  (have_undeclared_libvar): renamed from renamed from have_libvar.
  (headers.db_check2): check that GDBM version variable if GDBM header
  is choosen.

* ext/dbm/dbm.c (Init_dbm): use HAVE_DECLARED_LIBVAR_GDBM_VERSION and
  HAVE_UNDECLARED_LIBVAR_GDBM_VERSION macro.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 09:47:07 +00:00
akr e7a1d4a309 * ext/dbm/dbm.c (DBM::VERSION): define it by detecting _GDBM_H_ or
_DBM_IOERR.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 03:51:52 +00:00
akr 92e7c2d3ea * ext/dbm/extconf.rb: remove dbm.
forgotten in r34666.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 12:41:54 +00:00
akr 6d1f751207 * ext/dbm/extconf.rb: refine header/libraty mismatch detection.
check only for ndbm.h except libc.  check _GDBM_H_ for gdbm.
  check _DBM_IOERR for the original ndbm.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 12:29:50 +00:00
akr fbca1d0da1 * ext/dbm/extconf.rb: don't check libdbm. It is not a ndbm
implementation.  (libdbm in Version 7 Unix is database library
  for single database per process.)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 12:10:32 +00:00
akr 2f92a267f4 * ext/dbm/extconf.rb: refactored to split too long conditions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-16 22:32:10 +00:00
akr 078b3cf95e * ext/dbm/extconf.rb: check _DB_H_ macro unavailable except
Berkeley DB library.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-16 15:05:46 +00:00
nobu 34be46a32e * ext/fiddle/closure.c (callback): deal with unsinged integers.
[ruby-core:42458][Bug #5991][Bug #6022]
* ext/fiddle/conversions.c (value_to_generic, generic_to_value):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 10:57:05 +00:00
nobu fa65df0d08 * ext/fiddle/closure.c (callback): same as r34506.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 10:52:31 +00:00
drbrain b6c604d757 * ext/zlib/zlib.c (Init_zlib): Added Zlib::TEXT and note that
Zlib::ASCII is deprecated in zlib 1.2.3 and newer.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 04:30:37 +00:00
drbrain 72282ab1e2 * ext/zlib/zlib.c: Move constant descriptions to constants. Remove
extra comment block at the top of Init_zlib().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 04:25:11 +00:00
drbrain 623169a5c6 * ext/zlib/zlib.c (Init_zlib): Added Zlib::FIXED and Zlib::RLE
strategies.
* NEWS:  Add note about the new Zlib constants.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 01:28:05 +00:00
drbrain b52693b5a8 * ext/zlib/zlib.c: Improve documentation. [ruby-trunk - Bug #5948]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 01:12:08 +00:00
akr f119915f51 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-11 12:05:57 +00:00
drbrain 1516f8eb9f * ext/zlib/zlib.c (rb_inflate_add_dictionary): Added
Zlib::Inflate#add_dictionary to allow users to pre-specify
  for using during #inflate.  [ruby-trunk - Feature #5937]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-11 00:37:44 +00:00
drbrain 403dc5357d * ext/zlib/zlib.c (do_inflate): Inflate more data if buffered data
exists.  Allows Zlib::Inflate#set_dictionary to work.
  [ruby-trunk - Bug #5929]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-11 00:29:52 +00:00
tenderlove 59a1344808 * ext/psych/parser.c: removed external encoding setter, allow parser
to be reused.
* ext/psych/lib/psych/parser.rb: added external encoding setter.
* test/psych/test_parser.rb: test parser reuse

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 18:44:27 +00:00
nobu 14c97cf9b6 * ext/dl/extconf.rb: clang does not use -fno-defer-pop during compilation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 16:41:08 +00:00
nobu 96ab37015e * ext/dl/dl.h (ALIGN_OF): use offsetof().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 16:30:43 +00:00
nobu 196151158f * ext/dl/dl.h (DLALIGN): round up at once and get rid of overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 16:29:08 +00:00
nobu d77b2387cf * ext/fiddle/fiddle.c (Init_fiddle): declare in modern style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 15:15:57 +00:00
nobu f90f02ab20 * ext/dl/dl.c (Init_dl): fix mangled documnet.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 07:48:22 +00:00
usa b2ba3242ea * ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
currenly pack/unpack does not accept "q!" and "Q!".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 07:10:26 +00:00
usa da098bd36e * ext/fiddle/conversions.c (value_to_generic): src is not guranteed as
a Bignum if the type is LONG_LONG.  it may be a Fixnum if the value
  is small.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 07:03:07 +00:00
nobu 57b2175207 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 03:25:07 +00:00
usa 70b504badb * ext/dl/lib/types.rb: Win64 support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 02:32:58 +00:00
nobu 83c7d9df2b * string.c (rb_str_modify_expand): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 13:30:04 +00:00
nahi 3ff2f9f3a3 * ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
option to prevent BEAST attack. See [Bug #5353].

  In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
  TLS-CBC-IV vulunerability described at
  http://www.openssl.org/~bodo/tls-cbc.txt
  It's known issue of TLSv1/SSLv3 but it attracts lots of attention
  these days as BEAST attack. (CVE-2011-3389)

  Until now ossl sets OP_ALL at SSLContext allocation and call
  SSL_CTX_set_options at connection.  SSL_CTX_set_options updates the
  value by using |= so bits set by OP_ALL cannot be unset afterwards.

  This commit changes to call SSL_CTX_set_options only 1 time for each
  SSLContext. It sets the specified value if SSLContext#options= are
  called and sets OP_ALL if not.

  To help users to unset bits in OP_ALL, this commit also adds several
  constant to SSL such as
  OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.  These constants were
  not exposed in Ruby because there's no way to unset bits in OP_ALL
  before.

  Following is an example to enable 0/n split for BEAST prevention.

    ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS

* test/openssl/test_ssl.rb: Test above option exists.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 05:27:14 +00:00
emboss 45706e70c9 * ext/openssl/ossl_x509name.c: Use the numerical representation of
unrecognized OIDs instead of the sn "UNDEF".

* test/openssl/test_x509name.rb: Add tests for the fixed behavior.

  Patch provided by Paul Kehrer, thanḱ you!
  [ruby-core:41769] [Feature #5787]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 04:19:33 +00:00
emboss 460c8907c9 * ext/openssl/ossl_asn1.c: Call INT2NUM only once for GeneralString.
Thanks to Mantas Mikulenas for noticing and providing a patch!
  [ruby-core:42358] [Bug #5972]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 01:03:16 +00:00
emboss aa3854e33d * ext/openssl/ossl_cipher.c: Add warning about key as IV.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 00:29:26 +00:00
nobu cf1a22fdf9 * st.c (st_update): table can be unpacked in the callback.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-07 05:52:15 +00:00
nobu af01b0fb07 * ext/-test-/st/numhash/numhash.c (numhash_alloc): free st_table.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-07 05:43:49 +00:00
nobu 97c3c98762 * st.c (st_foreach): should not yield same pair when checking
after unpacking.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-07 05:29:20 +00:00
drbrain 30f0e97ef0 * ext/openssl/ossl_x509store.c: Add class documentation for
OpenSSL::X509::Store


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-02 22:54:10 +00:00
akr 5525d82134 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-02 11:51:25 +00:00
nobu ef84b7c678 * ext/dl/cptr.c (rb_dlptr_new2): remove unused variable.
* ext/iconv/iconv.c (get_iconv_opt_i): ditto.

	* ext/syck/token.c (Plain): fix types on LP64.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-30 21:47:35 +00:00
nobu f3dabacefb * ext/readline/readline.c (readline_attempted_completion_function):
respect encodings.  [Bug #5941]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-29 03:18:11 +00:00
nobu 8335ce7065 * ext/io/console/console.c (io_getch): default delegating method
for StringIO.  https://github.com/nobu/io-console/issues/4
* ext/stringio/stringio.c: moved some methods to hidden modules.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-25 18:24:09 +00:00
nobu ed469831e4 * file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
(rb_enc_path_last_separator, rb_enc_path_end)
  (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
  path handling functions.
* file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
  (rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
  (rb_file_join): should respect the encodings of arguments than
  file system encoding.  [ruby-dev:45145] [Bug #5919]
* dir.c (check_dirname, ruby_glob0): ditto.
* ext/pathname/pathname.c (path_sub_ext): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-25 02:32:06 +00:00
nobu 04726dd749 * vm.c (rb_iter_break_value): new function to break a block with
the value.  [ruby-dev:45132] [Feature #5895]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-24 05:20:48 +00:00
tadf 1d794b9335 ext/date/date_strptime.c: moved detector of leftover.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-18 22:54:09 +00:00
tadf 49d65bc4d6 ext/date/date_parse.c: [ruby-core:42173].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-18 22:13:10 +00:00
nobu d3b540cf40 * ext/curses/curses.c (cWindow, cMouseEvent): made typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-18 09:06:48 +00:00
tenderlove 8cf05741bc * ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loading
subclasses of String with ivars
* ext/psych/lib/psych/visitors/yaml_tree.rb: Added support for dumping
  subclasses of String with ivars
* test/psych/test_string.rb: corresponding tests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-18 03:52:01 +00:00
tenderlove ee3ebc2de5 * ext/psych/lib/psych/visitors/to_ruby.rb: Added ability to load array
subclasses with ivars.
* ext/psych/lib/psych/visitors/yaml_tree.rb: Added ability to dump
  array subclasses with ivars.
* test/psych/test_array.rb: corresponding tests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-18 01:44:21 +00:00