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

256 Коммитов

Автор SHA1 Сообщение Дата
nari 4166390229 * NEWS: add a news about GC::Profiler.raw_data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 02:35:39 +00:00
nari e2f951656f * NEWS: add a news about rb_newobj_of() and NEWOBJ_OF().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 02:35:36 +00:00
nari 805b08f292 * eval.c (f_current_dirname): add the new method for Kernel.
This method almotst same as File.dirname(__FILE__). One
  different behavior is it returns nil when __FILE__ returns nil.
  [Feature #3346]

* NEWS:  ditto

* test/ruby/test_method.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03 01:37:50 +00:00
nobu 499b5a9197 proc.c: main.define_method
* proc.c (top_define_method): new method, main.define_method.
  [ruby-core:45715] [Feature #6609]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01 23:24:33 +00:00
ko1 98c96a69c3 * NEWS: add a news about objspace,
ObjectSpace.reachable_objects_from.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01 13:29:28 +00:00
shugo ba1bd089c8 * NEWS: add note for Module#refine, Module#refinements,
Module#using, and Kernel#using.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01 07:48:29 +00:00
tenderlove 2285319b31 * thread.c: added Thread#thread_variable_(get|set),
Thread#thread_variable?, and Thread#thread_variables for operating
  on variables that are local to threads. [ruby-core:47790]

* vm.c: ditto

* test/ruby/test_thread.rb: tests for thread variables.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-29 17:22:36 +00:00
marcandre e44e356b53 * lib/ostruct.rb: Add [] and []=, base on a patch by Thomas Sawyer
[ruby-core:42779] [Feature #6056]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 21:20:10 +00:00
marcandre 3785d2675a * lib/ostruct.rb: Also accept {Open}Struct as argument to new
[ruby-core:47476] [Feature #7007]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 21:19:50 +00:00
marcandre b4300d25c9 * lib/ostruct.rb: Add OpenStruct#eql? and OpenStruct#hash
[ruby-core:42651] [Bug #6029]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 21:19:15 +00:00
marcandre 15d4862b91 * lib/ostruct.rb (each_pair): Add #each_pair [#1400]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 21:18:53 +00:00
tenderlove 82af182e74 * object.c (rb_mod_const_get): const_get accepts qualified constant
strings.  e.g. Object.const_get("Foo::Bar::Baz") [ruby-core:41404]

* test/ruby/test_module.rb: tests for new behavior

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-26 21:31:23 +00:00
nobu e3efce6df1 array.c: use rb_random_ulong_limited
* array.c (rb_ary_sample): use rb_random_ulong_limited, since
  precision of long may be larger than double.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-09 09:01:40 +00:00
nobu a4ce3ab4fd remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-03 03:22:22 +00:00
emboss e29819df6e * ext/openssl/extconf.rb: Detect OpenSSL_FIPS macro
ext/openssl/ossl.c: Expose OpenSSL::OPENSSL_FIPS constant to
  indicate whether OpenSSL runs in FIPS mode.
  test/openssl/test_pkey_dh.rb: Generate 256 bit keys for
  non-FIPS installations to improve test performance (e.g. for
  rubyci).
  test/openssl/utils.rb: Replace DSS1 as certificate signature
  digest with SHA1 for FIPS installations when using DSA by
  introducing TestUtils::DSA_SIGNATURE_DIGEST.
  test/openssl/test_x509cert.rb: 
  test/openssl/test_x509crl.rb:
  test/openssl/test_x509req.rb: Use DSA_SIGNATURE_DIGEST
  NEWS: Introduce OpenSSL::OPENSSL_FIPS
  
  These changes allow running the OpenSSL tests in FIPS mode
  while keeping a high performance for non-FIPS installations.
  Introduction of OpenSSL::OPENSSL_FIPS allows for applications
  to react to special requirements when using OpenSSL in FIPS mode.
  [Feature #6946] [ruby-core:47345]
- Diese und die folgenden Zeilen werden ignoriert --

M    ext/openssl/extconf.rb
M    ext/openssl/ossl.c
M    NEWS
M    ChangeLog
M    test/openssl/utils.rb
M    test/openssl/test_x509crl.rb
M    test/openssl/test_x509req.rb
M    test/openssl/test_x509cert.rb
M    test/openssl/test_pkey_dh.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-03 01:14:26 +00:00
emboss 25e6db3e3c * ext/openssl/extconf.rb: Check existence of OPENSSL_NPN_NEGOTIATED.
ext/ossl_ssl.c: Support Next Protocol Negotiation. Protocols to be
  advertised by the server can be set in the SSLContext by using
  SSLContext#npn_protocols=, protocol selection on the client is
  supported by providing a selection callback with
  SSLContext#npn_select_cb. The protocol that was finally negotiated
  is available through SSL#npn_protocol.
  test/openssl/test_ssl.rb: Add tests for Next Protocol Negotiation.
  NEWS: add news about NPN support.
  [Feature #6503] [ruby-core:45272]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-31 09:47:36 +00:00
tenderlove 5571c7315e * ext/syck: removed. Fixes [ruby-core:43360]
* test/syck: removed.

* lib/yaml.rb: only require psych, show a warning if people try to set
  the engine to syck.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 17:43:16 +00:00
eregon fd7dc23d28 Kernel#inspect: improve consistency and do not call #to_s.
* object.c (rb_obj_inspect): Kernel#inspect: do not call #to_s. A class
  can now benefit from the nice default #inspect even if it defines #to_s.
  Also, there is no more unexpected change in #inspect result.
* NEWS: Add note about the change.
* bignum.c, io.c, numeric.c, object.c, proc.c, vm.c (Init_*):
  Adapt internal structures (by aliasing #inspect to #to_s) so they
  don't rely on the removed behavior (#inspect calling overridden #to_s).
* test/ruby/test_object.rb (test_inspect): add tests for Kernel#inspect.
* lib/pp.rb (class PP): do not call #to_s anymore, as #inspect
  no more does (mame).
* test/test_pp.rb (class PPInspectTest): remove related assertion (mame).
  [ruby-core:43238][Feature #6130]
* test/drb/drbtest.rb (DRbCore#teardown, DRbAry#teardown):
  adapt DRb tests with the new change (shirosaki).
  [ruby-core:47182][Bug #6866]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-15 11:50:01 +00:00
drbrain ead728ca7d * lib/net/http.rb: Added SSL session reuse across connections for a
single instance to speed up connection.  [Feature #5341]
* NEWS:  ditto
* test/net/http/test_https.rb:  Tests for #5341


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25 00:05:59 +00:00
tenderlove 91bd6e711d * parse.y: added symbols and qsymbols productions for %i and %I
support. %i{ .. } returns a list of symbols without interpolation,
  %I{ .. } returns a list of symbols with interpolation.  Thanks to
  Josh Susser for inspiration of this feature. [Feature #4985]

* ext/ripper/eventids2.c: added ripper events for %i and %I.

* test/ripper/test_parser_events.rb: ripper tests

* test/ripper/test_scanner_events.rb: ditto

* test/ruby/test_array.rb: test for %i and %I behavior

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-24 18:10:35 +00:00
drbrain daf1676441 * NEWS: Updated net/http for automatic proxy detection (#6546) and
automatic gzip and deflate compression (#6492, #6494).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20 02:05:27 +00:00
naruse 4689853711 * lib/net/http.rb (Net::HTTP#connect): use local_host and local_port
if specified. patched by Ricardo Amorim [Feature #6617]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11 18:37:18 +00:00
drbrain 3cf7d1b57e * ext/zlib/zlib.c: Added streaming support to inflate processing.
This allows zlib streams to be processed without huge memory growth.
  [Feature #6612]
* NEWS:  ditto
* ext/zlib/zlib.c (zstream_expand_buffer):  Uses rb_yield when a block
  is given for streaming support.  Refactored to use
  zstream_expand_buffer_into to remove duplicate code.
* ext/zlib/zlib.c (zstream_expand_buffer_protect):  Added wrapper
  function to pass jump state back through GVL-free section to allow
  zstream clean-up before terminating the ruby call.
* ext/zlib/zlib.c (zstream_expand_buffer_without_gvl):  Acquire GVL to
  yield processed chunk of output stream.
* ext/zlib/zlib.c (zstream_detach_buffer):  When a block is given,
  returns Qnil mid-stream and yields the output buffer at the end of
  the stream.
* test/zlib/test_zlib.rb:  Updated tests


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10 18:28:40 +00:00
drbrain 1a853390ee * ext/zlib/zlib.c: Revert r36349. Added streaming support to inflate
processing.  rb_block_given_p() is not callable without the GVL.
* ext/zlib/extconf.rb:  ditto
* NEWS:  ditto
* test/zlib/test_zlib.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10 03:51:25 +00:00
drbrain 3e419e6c4a * ext/zlib/zlib.c: Added streaming support to inflate processing.
This allows zlib streams to be processed without huge memory growth.
  [Feature #6612]
* NEWS:  ditto
* ext/zlib/zlib.c (zstream_expand_buffer):  Uses rb_yield when a block
  is given for streaming support.  Refactored to use
  zstream_expand_buffer_into to remove duplicate code.
* ext/zlib/zlib.c (zstream_expand_buffer_protect):  Added wrapper
  function to pass jump state back through GVL-free section to allow
  zstream clean-up before terminating the ruby call.
* ext/zlib/zlib.c (zstream_expand_buffer_without_gvl):  Acquire GVL to
  yield processed chunk of output stream.
* ext/zlib/zlib.c (zstream_detach_buffer):  When a block is given,
  returns Qnil mid-stream and yields the output buffer at the end of
  the stream.
* ext/zlib/extconf.rb:  Update INCFLAGS to find internal.h for
  rb_thread_call_with_gvl
* test/zlib/test_zlib.rb:  Updated tests


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10 00:04:47 +00:00
kazu d5db3754f9 fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-05 02:04:57 +00:00
nobu 0de9b0fee7 NEWS
* NEWS: about __callee__ and Module#prepend.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-05 01:53:30 +00:00
drbrain 802c468fc6 * ext/zlib/zlib.c (zstream_run): Process zlib streams without GVL.
[Feature #6615]
* NEWS:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-02 21:03:15 +00:00
kazu af2e9982d6 fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-30 09:36:36 +00:00
nobu 7c3d0ce3cc method transplanting
* proc.c (rb_mod_define_method): allow method transplanting from a
  module to either class or module.  [ruby-core:34267][Feature #4254]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-25 08:06:43 +00:00
emboss 7db3bb5c8f * NEWS: Add note about the new private key export behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 01:31:06 +00:00
nobu e6424f805b * removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-09 21:36:05 +00:00
emboss f175918765 * NEWS: document new features of Ruby OpenSSL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-09 21:24:40 +00:00
nagachika 24b1d2f2f4 * NEWS: expanded a tab.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 04:47:43 +00:00
ko1 ca433168ba * NEWS: add Kernel#caller's second argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 04:51:32 +00:00
knu 05b26a85b8 * ext/syslog/syslog.c: Classify constants and macros into several
sub-modules. (Syslog::Priority, Syslog::Level, Syslog::Option
  and Syslog::Macros)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 07:18:49 +00:00
drbrain 8f231e1eef * ext/syslog/lib/syslog/logger.rb: Added Syslog::Logger which was
ported from the SyslogLogger gem.  [ruby-trunk - Feature #5096]
* NEWS:  ditto.
* test/syslog/test_syslog_logger.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17 21:14:24 +00:00
nobu 770ddcdfe0 * hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.
[Feature #6276]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 03:46:55 +00:00
naruse 62c9ecfa12 Revert r35339-35343 because of no tests.
* hash.c: Alias ENV.to_h to ENV.to_hash [ref #6276]

* lib/ostruct.rb: Add OpenStruct#to_h [Feature #6276]

* struct.c: Add Struct#to_h [Feature #6276]

* object.c: Add NilClass#to_h [Feature #6276]

* hash.c: Add Hash#to_h [Feature #6276]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 03:59:15 +00:00
marcandre fc7676fcd6 * hash.c: Alias ENV.to_h to ENV.to_hash [ref #6276]
[rubyspec:6587eead7cd1]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:16:40 +00:00
marcandre db66739c7c * lib/ostruct.rb: Add OpenStruct#to_h [Feature #6276]
[ref #1400] [rubyspec:9e0250b2fc6f]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:16:25 +00:00
marcandre 1dbe0f0672 * struct.c: Add Struct#to_h [Feature #6276]
[ref #4862] [rubyspec:2082ef46d46e]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:16:10 +00:00
marcandre 33399fe824 * object.c: Add NilClass#to_h [Feature #6276]
[ref #5008] [rubyspec:dc5ecddbd608]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:15:56 +00:00
marcandre f92be2c01a * hash.c: Add Hash#to_h [Feature #6276]
[rubyspec:84b7fe3f24d2]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:15:42 +00:00
marcandre 6b18a8c2e9 * hash.c (rb_hash_set_default_proc): Accept nil, patch by Run Paint
[Feature #4234]

* test/ruby/test_hash.rb: test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09 04:07:53 +00:00
emboss 7d8a8956de * NEWS: add note about unified behavior of encoding nil values in
instances of OpenSSL::ASN1::ASN1Data.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-28 23:28:17 +00:00
kazu 25755e38b7 remove a trailing space
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-16 15:20:03 +00:00
akr 48b5b163fc * lib/tmpdir.rb: update document for changing
FileUtils.remove_entry_secure to FileUtils.remove_entry.

* NEWS: add incompatiblity note for lib/tmpdir.rb.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-11 22:37:04 +00:00
akr ed924d2fa9 cosmetic change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-11 05:53:20 +00:00
nobu 0b2c4f43d2 * enumerator.c: add Enumerable#lazy. based on the patch by
Innokenty Mikhailov at <https://github.com/ruby/ruby/pull/101>
  [ruby-core:37164] [Feature #4890]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-08 15:30:28 +00:00