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

5597 Коммитов

Автор SHA1 Сообщение Дата
marcandre b81950f480 * lib/matrix.rb: Add Vector#round. Patch by Jordan Stephens.
[Fixes GH-802]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-05 23:45:42 +00:00
nobu 418d915f7b remove GEM directories at exit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-05 05:07:39 +00:00
akr 9ee9812dad * lib/time.rb (strptime): Support %s.%N.
[ruby-core:68301] [Bug #10904] Patch by Sadayuki Furuhashi.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 00:12:48 +00:00
hsbt d9c32d62a0 * lib/rubygems: Update to RubyGems 2.4.6 and HEAD(800f2e6).
Fixed #1159, #1171, #1173 on rubygems/rubygems
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 13:00:45 +00:00
hsbt b89e894399 * lib/rake: Update to rake (9237e74), typo fix and remove needless
private syntax.
* test/rake: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 11:55:47 +00:00
gogotanaka 0c3a0d6588 * lib/cmath.rb (log): raise ArgumentError when more than 2 arguments
are passed. [ruby-core:66143] [Bug #10487]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 23:53:21 +00:00
marcandre 0c4631b880 * lib/uri: [doc] Update common.rb [ci-skip] [fixes GH-838]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 18:09:10 +00:00
marcandre ecf33043b8 * lib/matrix.rb: [Doc] Fix Vector multiplication documentation [ci-skip]
[Fixes GH-837]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-22 20:22:31 +00:00
nobu 466bd05fda resolv.rb: fix equality
* lib/resolv.rb (Resolv::DNS::Resource#==, #hash): elements
  returned by Kernel#instance_variables are Symbols now.
  [ruby-core:68128] [Bug #10857]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 02:47:19 +00:00
hsbt f6b9a0feaf * hash.c: Added docs to explain that #include? and #member? do not
check member equality
* lib/set.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 01:47:28 +00:00
nobu b1adbd14e5 random.c: rand_random_number
* random.c (rand_random_number): add a method to return a random
  number like SecureRandom to Random::Formatter.
* lib/securerandom.rb (random_bytes): move to Random::Formatter,
  the base method of the module.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-14 03:20:04 +00:00
nobu 1f13a179d3 securerandom.rb: Random::Formatter
* lib/securerandom.rb (Random::Formatter): extract random number
  formatting methods into a module.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-14 03:02:32 +00:00
nobu eeeb7ae8c0 random.c: Random.raw_seed
* random.c (random_raw_seed): extract platform dependent random
  seed initialization function as a new method Random.raw_seed.
* lib/securerandom.rb (SecureRandom): use Random.raw_seed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-14 03:01:36 +00:00
mame 6b6680945e * lib/base64.rb: make urlsafe mode user-friendly.
* lib/base64.rb (Base64.urlsafe_encode64): a new option "padding" to
  suppress the padding character ("=").

* lib/base64.rb (Base64.urlsafe_decode64): now it accepts not only
  correctly-padded input but also unpadded input.
  [Feature #10740][ruby-core:67570]

* test/base64/test_base64.rb: Test for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13 12:31:30 +00:00
normal 709e0ecbda set: speed up Set#include?
* lib/set.rb (initialize): internal hash defaults to false

* lib/set.rb (include?): use Hash#[] for optimized dispatch.
  Patch by Ismael Abreu <ismaelga@gmail.com>
  [ruby-core:67664] [Misc #10754]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 19:04:16 +00:00
shugo cd29e5fcef * lib/net/ftp.rb (chdir, delete, gettextfile, mdtm, mkdir, nlst,
putbinaryfile, puttextfile, rename, rmdir, size): support
  Pathname. Patch by Joe Rafaniello. [fix GH-828]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10 02:26:06 +00:00
nobu 031c46f83a optparse.rb: update --version example [ci skip]
* lib/optparse.rb (OptparseExample): [DOC] update example code for
  --version option, to print OptparseExample::Version.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 15:26:11 +00:00
hsbt 1a98f56ae1 * lib/net/http/header.rb: pass header names as symbols.
Patch by @DamirSvrtan [fix GH-805]
* test/net/http/test_httpheader.rb: added test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 11:09:44 +00:00
hsbt c3546c76c8 * lib/rubygems: Update to RubyGems HEAD(5c3b6f3).
Fixed #1156, #1142, #1115, #1142, #1139 on rubygems/rubygems
* test/rubygems:  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05 13:42:45 +00:00
nobu af5b7053f1 mkmf.rb: avoid interference
* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
  interference by modifying global variables in have_devel? method.
  [ruby-core:67962] [Bug #10821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-03 08:15:47 +00:00
nobu 73cce16240 mkmf.rb: set cxxflags
* lib/mkmf.rb (configuration): set the default cxxflags, which is
  referred from the default CXXFLAGS, for extension libraries.
  [Fix GH-823]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-03 03:26:38 +00:00
nobu 632fb2e15b drb.rb: do not wait handler threads
* lib/drb/drb.rb (stop_service): just stop but do not wait handler
  threads.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17 15:57:50 +00:00
nobu c474ecb0df drb.rb: stop all handlers to fix thread leaks
* lib/drb/drb.rb (stop_service): stop all handler threads started
  in main_loop.  fix thread leaks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17 15:35:09 +00:00
duerst e3c4c7e13b * lib/uri/mailto.rb: raising URI::InvalidComponentError instead
of failing with undefined method `split' for nil:NilClass for
  mailto: URIs without opaque part. [Bug #10738]
* test/uri/testuri.rb: Test for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14 09:06:13 +00:00
nobu 77f3125567 rdoc/text.rb: fix infinite loop
* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
  CR.  should check if substitution occurred too.
  [ruby-dev:48813] [Bug #10732]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 09:01:28 +00:00
hsbt ae0e680769 * lib/optparse.rb: improvements for OptionParser documentation.
[misc #10608][ruby-core:66901][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 04:37:12 +00:00
hsbt 07b87cd239 * lib/rubygems: Update to RubyGems HEAD(e53c54a).
* test/rubygems:  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-09 14:20:10 +00:00
nobu 759a31b4a3 Revert GH-808
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 07:07:59 +00:00
nobu e247d9e145 open3.rb: Hash.try_convert
* lib/open3.rb (popen_run): use Hash.try_convert for duck typing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 03:52:01 +00:00
normal 89ba151440 lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
This allows "gem install /path/to/local.gem" to be successful
on a machine without a network connection.

[ruby-core:67411] [Bug #10712]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-07 22:19:19 +00:00
akr 1ade9cad02 * lib/open3.rb: Open3 properly passes non-keyword hash args to spawn.
Fixed by Josh Cheek.  [Fix GH-808]
  Related to [ruby-core:67347] [Bug #10699]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-07 15:29:28 +00:00
nobu 53d9cb7304 mkmf.rb: clean timestamps
* lib/mkmf.rb (create_makefile): clean timestamp files of
  destination directories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 12:33:22 +00:00
nobu 39ad417562 ostruct.rb: table
* lib/ostruct.rb (OpenStruct#table): revert for JSON.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 05:27:31 +00:00
nobu 10ce99866f ostruct.rb: append suffixes to protected methods
* lib/ostruct.rb (modifiable?, new_ostruct_member!, table!):
  append suffixes to protected methods so that they will not clash
  with assigned members.  [Fix GH-806]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 01:57:26 +00:00
hsbt 837d30371b * lib/drb/drb.rb: removed unused argument. Patch by @vipulnsward
[fix GH-515]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 00:21:08 +00:00
hsbt 05c108cdba * lib/tempfile.rb: provide default basename parameter.
[fix GH-523] Patch by @dissolved
* test/test_tempfile.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 00:18:38 +00:00
ayumin 1711e80cf1 Revert r49118 [Feature #10652]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 11:36:35 +00:00
ayumin 68f7424bde * lib/net/http.rb (proxy_user): retrieve proxy user from http_proxy.
* lib/net/http.rb (proxy_pass): retrieve proxy password from http_proxy.
  Patch by Rafael dos Santos Silva. [fix GH-763]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 07:21:56 +00:00
hsbt a84bfcbf00 * lib/net/http.rb: More descriptive error message when net/http fails
to connect to a server. Patch by @xaviershay [fix GH-700]
* test/net/http/test_http.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 01:38:59 +00:00
hsbt 2743ad8c25 * lib/net/http.rb (Net::HTTP#send_request): there is no response body
with HEAD request. Patch by @rodrigosaito [fix GH-520]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 12:07:04 +00:00
hsbt 73fc0cc572 * lib/webrick/utils.rb: removed unused argument variable.
[fix GH-356] Patch by @vipulnsward
* lib/webrick/server.rb: ditto.
* lib/webrick/ssl.rb: ditto.
* test/webrick/test_utils.rb: added test for WEBrick::Utils#create_listeners.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 06:53:12 +00:00
hsbt 045de8a9c5 * lib/securerandom.rb: improve syntax and grammar of documentation.
[fix GH-796][ci skip] Patch by @Erol

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 06:36:00 +00:00
akr ec7f1f5dc2 * lib/resolv.rb (Resolv::DNS::Label::Str#==): Check class equality.
(Resolv::DNS::Name#initialize): Normalize labels as
  Resolv::DNS::Label::Str objects.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 00:10:04 +00:00
akr 331b0ac55b [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01 15:49:50 +00:00
nobu 54bd85d19d resolv.rb: String#b
* lib/resolv.rb (Resolv::DNS::Label::Str#initialize): use String#b.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-31 14:59:19 +00:00
akr 6cf00e15f8 * lib/resolv.rb (Resolv::DNS::Label::Str#initialize): Set encoding
ASCII-8BIT before downcase.  case insensivity of DNS labels doesn't
  apply non-ASCII characters.  [RFC 4343]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-31 08:50:10 +00:00
akr e36d40f923 * lib/resolv.rb (Resolv::DNS::Name#==): Compare an array of Label:Str
objects.  Label#Str#== is case-insensitive.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-31 04:45:05 +00:00
nobu 69a7bb31f9 resolv.rb: case-insensitive comparison
* lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
  comparison should be case-insensitive as well.
  [ruby-core:66498] [Bug #10550]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 07:16:14 +00:00
nobu a0325ea704 resolv.rb: dots differences
* lib/resolv.rb (Resolv::DNS::Name): names with different dots
  should be different.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 07:03:47 +00:00
duerst b1cf08496b lib/uri/common.rb: Initialize HTML5ASCIIINCOMPAT to empty Array
to avoid error during bootstrap when encodings are not yet defined. [Bug #10678]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 04:17:10 +00:00