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

3836 Коммитов

Автор SHA1 Сообщение Дата
tadf 057e0a373c * ext/date/date_core.c: some improvements for performance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-09 08:18:57 +00:00
nobu 29e497d231 * ext/json/{generator/generator.c,parser/parser.rl}: fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 09:00:54 +00:00
nobu bc1fd9458d * ext/json/parser/parser.rl (JSON_parse_object): add missing parens.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 09:00:51 +00:00
nobu 4902ef7d59 * ext/json/parser/parser.rl (convert_encoding): should not modify
the argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 07:40:41 +00:00
nobu b16fd08622 * ext/json/parser/parser.rl (convert_encoding): no needs to use
force_encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 07:39:09 +00:00
nobu c23dea553e * ext/json/parser/prereq.mk: remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 07:01:16 +00:00
usa 8de18f9cda * ext/openssl/ossl.h: include openssl/e_os2.h before checking the
defition of OPENSSL_SYS_WIN32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 06:03:17 +00:00
nobu 4837d6d5b5 * ext/-test-/string/enc_associate.c: needs ruby/encoding.h for
rb_to_encoding().  fixed #4993.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 02:08:29 +00:00
nobu cfa0035962 * encoding.c (rb_enc_set_index, rb_enc_associate_index): should
check if frozen.
* parse.y (rb_intern3), ruby.c (process_options, ruby_script):
  defer freezing after associating encodings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-07 06:44:46 +00:00
nobu f4ca906d5c * ext/-test-/string/modify.c: split from init.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-07 06:40:33 +00:00
nagachika ea8b916307 * ext/coverage/coverage.c: resurrect r32071 + add GC guard for
rb_coverages. [ruby-core:37352] [Bug #4927]
  [ruby-core:36539] [Feature #4796]

* test/coverage/test_coverage.rb resurrect r32071.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-04 15:55:06 +00:00
mame 74454f5796 * ext/coverage/coverage.c: revert r32071. The commit caused SEGV on
some minor nonfree OS.  I have no means of debugging the bug.  My
  personal opinion is that such OS should be unsupported unless there
  is an active maintainer.  [ruby-core:37352]

* test/coverage/test_coverage.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-04 12:21:02 +00:00
yugui 3b63aee193 * ext/extmk.rb (extmake): suppresses outputs from extconf.rb.
(extmake) warns a failure in extconf.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-03 14:44:59 +00:00
nobu 198c2570e7 * sytle fixes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 20:20:32 +00:00
tadf 72be91b5c0 reedited previous commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 18:49:04 +00:00
tadf 6c1e759c3f * ext/date/date_core.c: mathn still alive (should die soon).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 18:24:50 +00:00
emboss 1dcd4b325e * ext/openssl/ossl.c/.h: Added ossl_x509_name_sk2ary.
* ext/openssl/ossl.c: Replaced ossl_x509_ary2k by generic macro to
  simplify future conversions.
* ext/openssl/ossl_ssl.c: Implement SSLSocket#client_ca.
* test/openssl/test_ssl.rb: Add test for SSLSocket#client_ca.
  Thanks to Ippei Obayashi for providing the patch!
  [ Ruby 1.9 - Feature #4481 ] [ruby-core:35461]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 14:48:52 +00:00
tadf 1a876fb61e * ext/date/date_core.c (m_ajd): refers a constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 12:17:52 +00:00
nobu 3b8f9dc0b0 * ext/io/console/io-console.gemspec: spin-off gem for 1.9.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 11:54:27 +00:00
tadf 1b10d8c327 * ext/date/date_core.c: trivial changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 11:38:33 +00:00
tadf 97772985f0 * ext/date/date_core.c: modified doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 11:05:24 +00:00
ko1 3b32735546 * ext/objspace/objspace.c (ObjectSpace.count_tdata_objects):
Fix rdoc.
* ext/objspace/objspace.c (ObjectSpace.count_tdata_objects):
  Change key type if the klass of a object is zero (internal object).
  Read rdoc for details.
* internal.h: export rb_objspace_data_type_name().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 08:37:06 +00:00
tadf 23658b355c * ext/date/date_core.c: avoided using timev.
* ext/date/date_strftime.c: ditto.
	* ext/date/date_tmx.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29 14:47:04 +00:00
eban 64263ddeb6 * ext/openssl/ossl.h (OPENSSL_SYS_WIN32): define only if not defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29 14:40:44 +00:00
eban 2a9819b747 * ext/openssl/ossl.h (OPENSSL_SYS_WIN32): support for mingw(msys).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29 14:22:02 +00:00
eban d7ccf5e1cc * ex/tk/extconf.rb: support for the latest ActiveTcl with mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29 14:11:19 +00:00
mrkn bb6384761e * ext/bigdecimal/bigdecimal.c (BigMath_s_log): move BigMath.log from
bigdecimal/math.rb.
* ext/bigdecimal/lib/bigdecimal/math.rb: ditto.
* test/bigdecimal/test_bigdecimal.rb: move test for BigMath.log from
  test/bigdecimal/test_bigmath.rb.
* test/bigdecimal/test_bigmath.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-27 16:26:09 +00:00
tadf 8ce62003a0 * ext/date/date_parse.c: should use ALLOCA_N.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-26 23:01:56 +00:00
tadf 51a0501a39 * ext/date/date_core.c: refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-26 13:23:00 +00:00
emboss 93e1583d73 * ext/openssl/extconf.rb
* ext/openssl/ossl_missing.h/.c: add ASN1_put_eoc if missing.

* ext/openssl/ossl_asn1.c: introduce ossl_asn1_object_size and
  ossl_asn1_put_object to wrap functionality depending on OpenSSL
  version in use.
  Fixes	[ Ruby 1.9 - Bug #4916 ] reported by Hiroshi Nakamura.
  [ruby-core:37286]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-26 01:32:03 +00:00
tadf 3380f2ff6e * ext/date/date_core.c (date_strftime_internal): removed meaningless braces.
* ext/date/date_core.c (gengo): the value should be int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-25 16:03:11 +00:00
nahi 369b095015 * ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Try to shutdown SSL
connection more gracefully. Call SSL_shutdown() max 4 times until it  
  returns 1 (success). Bi-directional SSL close has several states but
  SSL_shutdown() kicks only 1 transition per call. Max 4 is from
  mod_ssl.c of Apache httpd that says 'max 2x pending * 2x data = 4'.
  See #4237.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-24 07:01:52 +00:00
tadf 3fbc9440fe * ext/date/date_core.c (c_valid_{julian,gregorian}_p): fixed the range of month.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-23 15:45:58 +00:00
tadf 2e83b82323 * ext/date/date_core.c: trivial changes on text.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-23 15:15:37 +00:00
nahi bf2e60cda7 * ext/openssl/ossl_x509name.c: Add X509::Name#hash_old as a wrapper
for X509_NAME_hash_old in OpenSSL 1.0.0. See #4805

* test/openssl/test_x509name.rb (test_hash): Make test pass with
  OpenSSL 1.0.0. 

* NEWS: Add it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-23 13:51:55 +00:00
nahi 544daf1f7a * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_set_time): Check
argument type with NUM2LONG if the arg is not a Time object.
  See #4919.

* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_set_timeout): Check
  type with NUM2LONG. Time as an arg is not allowed. See #4919.

* test/openssl/test_ssl_session.rb (test_session_time,
  test_session_timeout): Test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-23 10:36:09 +00:00
nahi dea3113ab3 * ext/openssl/ossl_ssl.c (ossl_sslctx_session_new_cb): Return 0 to
OpenSSL from the callback for SSL_CTX_sess_set_get_cb().
  Returning 0 means to OpenSSL that the the session is still valid
  (since we created Ruby Session object) and was not freed by us with
  SSL_SESSION_free(). Call SSLContext#remove_session(sess) in
  session_get_cb block if you don't want OpenSSL to cache the session
  internally.
  This potential issue was pointed by Ippei Obayashi. See #4416.

* test/openssl/test_ssl_session.rb (test_ctx_server_session_cb): Test
  it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 13:39:56 +00:00
emboss 8d836a15e4 * ext/openssl/ossl_ssl_session.c: Respect T_BIGNUM time values. Patch by
Tomoyuki Chikanaga.
  [ Ruby 1.9 - Bug #4919 ] [ruby-dev:43869]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 13:28:18 +00:00
kosaki dc8f58f6e8 * ext/socket/depend (SOCK_HEADERS): use $(top_srcdir) instaed of
$(topdir). sorry!



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 12:30:22 +00:00
nahi d8af9c854d * ext/openssl/ossl_ssl.c (ossl_sslctx_session_remove_cb):
OpenSSL::SSL::SSLContext#session_remove_cb was broken. It wrongly 
  tried to call the session_*new*_cb callback.

* test/openssl/test_ssl_session.rb (class OpenSSL): Test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 09:24:31 +00:00
emboss 26cb830df9 * ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DER
fallback scenarios.

* ext/openssl/ossl_pkey_dsa.c
* ext/openssl/ossl_x509req.c
* ext/openssl/ossl_pkey_rsa.c
* ext/openssl/ossl_pkey_ec.c
* ext/openssl/ossl_ssl_session.c
* ext/openssl/ossl_x509crl.c
* ext/openssl/ossl_pkey.c
* ext/openssl/ossl_pkey_dh.c
* ext/openssl/ossl_x509cert.c
* ext/openssl/ossl_pkcs7.c: Use OSSL_BIO_reset.

* ext/openssl/ossl_ssl.c
* ext/openssl/ossl_cipher.c
* ext/openssl/ossl_pkey_ec.c
* ext/openssl/ossl_pkcs12.c
* ext/openssl/ossl_ssl_session.c: Replace rb_raise occurences by
  ossl_raise. This automatically flushes OpenSSL's error queue.

* ext/openssl/ossl_pkcs7.c: Raise error if DER fallback for parsing
  fails.

* test/openssl/test_pkey_ec.rb
* test/openssl/test_pkey_dsa.rb
* test/openssl/test_pkey_rsa.rb: Add assertions that OpenSSL.errors is
  empty.

* test/openssl/test_pkey_rsa.rb: Remove initial OpenSSL.errors call in
  test_new.
  [ Ruby 1.9 - Bug #4885 ] [ruby-core:37134]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 08:41:08 +00:00
emboss 41c517d132 * ext/openssl/ossl_ssl.c: Use SSL_MODE_RELEASE_BUFFERS if available.
Thanks, Eric Wong, for providing the patch.
  [ Ruby 1.9 - Feature #4672 ] [ruby-core:36127]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 06:04:27 +00:00
nahi bda678dc5b * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_to_der):
OpenSSL::SSL::Session#to_der was broken. Fix buffer handling.

* test/openssl/test_ssl_session.rb (test_session): Test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-22 03:43:38 +00:00
tenderlove 40508ede73 * ext/psych/lib/psych/visitors/to_ruby.rb: Fix cyclic references of
objects.  Thanks to CvX for reporting the bug and a test case.
* test/psych/test_object.rb: test for cyclic object references.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-21 18:22:54 +00:00
kosaki 908baefe7d * internal.h: move rb_thread_io_blocking_region() declaration
from intern.h to internal.h. It's still experimental API and
  need more discussion. [ruby-dev:43698]
* include/ruby/intern.h: ditto.

* ext/socket/rubysocket.h: include internal.h.
* ext/socket/depend: add internal.h dependency.
* ext/socket/extconf.rb: add $INCFLAGS to topdir.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-21 12:31:17 +00:00
tadf 5b16ddf504 * ext/date/date_core.c (datetime_s_*): canonicalize 24 o'clock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-21 11:42:50 +00:00
kouji e49f890906 * ext/readline/readline.c (readline_getc): applied a patch in
#3827 by by Akio Tajima <artonx AT yahoo.co.jp>. (see #3827)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-21 04:30:14 +00:00
kouji 1daac53ce7 * ext/readline/extconf.rb: fixed bug, specify --disable-libedit
then disable libedit, does not specify then check readline and
  libedit if failed checking readline. (fixes #3375)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-21 04:20:33 +00:00
nahi c102821291 * ext/openssl/ossl_cipher.c, ext/openssl/lib/openssl/cipher.rb:
Documentation fix by Ippei Obayashi. See #4419.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-20 09:48:05 +00:00
nobu 0d5ed3d2ad * suppress compile warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 22:33:59 +00:00