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

4223 Коммитов

Автор SHA1 Сообщение Дата
drbrain 79f28211fd * lib/abbrev.rb: Fixed typo in abbrev pattern documentation. Based on
patch by Mark Rushakoff.  [ruby-trunk - #6346]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 23:55:53 +00:00
nobu bd62d2a95e lib/test/unit.rb: initialize instace variable
* lib/test/unit.rb (Test::Unit::Runner#output): suppress uninitialized
  instance variable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 20:12:20 +00:00
nobu 5789992f33 lib/test/unit.rb: use local output
* lib/test/unit.rb (Test::Unit::Runner#output): prefer local output to
  get rid of unexpected side effect in test/minitest/metametameta.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 19:47:47 +00:00
nobu 13c76c07e4 lib/test/unit.rb: test name in $0
* lib/test/unit.rb (MiniTest#run_test): show the running test in $0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 18:54:37 +00:00
nobu fbebe84864 lib/test/unit.rb: output in status line
* lib/test/unit.rb (Test::Unit::StatusLineOutput): new class to output
  in status line.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 18:54:23 +00:00
nobu ec76e156fe lib/test/unit.rb: refactoring puke
* lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
  drop useless reports, not override entirely.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 18:53:56 +00:00
naruse 49331ddec7 * lib/minitest/unit.rb (assert_match): refix of r35563.
r35563 breaks the intention of the original change.
  68858105b2
* lib/minitest/unit.rb (refute_match): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 17:49:53 +00:00
akr e1ee200bf7 refine an error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 11:15:46 +00:00
akr e76660caad * lib/securerandom.rb (random_bytes): call to_int method for the
argument at first.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 11:15:28 +00:00
naruse 34a8bfa971 * lib/minitest/unit.rb (assert_match): replace matcher only if both
matcher and obj are String. fix r35541. [Bug #6405]
  DON'T COMMIT IF YOU CAN'T RUN TEST.
  FIX AS SOON AS POSSIBLE YOU BREAK TESTS.
  patched by ayumin.
  https://github.com/seattlerb/minitest/pull/124

* lib/minitest/unit.rb (refute_match): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 09:08:17 +00:00
shugo 9be3aa1767 * lib/net/imap.rb (body_type_attachment): parse body type
"ATTACHMENT". [ruby-core:44849] [Bug #6397]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 04:05:44 +00:00
akr a961a8edf0 * lib/securerandom.rb: show actual read length in an error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-06 05:51:13 +00:00
ryan 6af843b9cb Imported minitest 2.12.1 (r7323)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-04 21:46:01 +00:00
naruse 8109c530b2 * lib/rdoc/parser.rb (RDoc.binary?): fix wrong regexp.
[ruby-core:44798] [Bug #6393]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-03 22:20:26 +00:00
nobu 9bee6cf51f rdoc: --extension option fix
* lib/rdoc/parser.rb (RDoc.alias_extension): a real file is irrelevant
  to aliasing.  [ruby-core:44796][Bug #6392]
* lib/rdoc/parser.rb (RDoc.zip?): non-existent file will not be a zip
  file.
* lib/rdoc/parser.rb (RDoc.can_parse_by_name): accept aliased
  extension file names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-03 16:33:22 +00:00
nobu 1348e3b9ac rdoc: non-binary multibyte
* lib/rdoc/parser.rb (RDoc.binary?): binary read data may have
  incomplete multibyte sequence.  [ruby-core:44798][Bug #6393]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-03 16:31:25 +00:00
nobu db33b28cc3 * lib/test/unit.rb (Test::Unit::RequireFiles#non_options): expand
real path to get rid of loading same files via symlinks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-02 14:55:53 +00:00
nobu 28b7df7820 * revert r35510 and r35511 which caused removing the headers everytime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-01 07:15:18 +00:00
nobu 1735969296 extconf.h dependency
* lib/mkmf.rb (MakeMakefile#depend_rules): deal with extconf.h
  dependency.  just remove it and bail out right now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-01 06:52:25 +00:00
akr 7d89ecdc52 * lib/fileutils.rb (copy_metadata): use File.lchown and File.lchmod to
update meta data of symlinks.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 14:37:54 +00:00
nobu 3c2f707f16 * lib/optparse.rb (OptionParser#to_a): split for each lines.
[ruby-dev:45568][Bug #6348]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 20:46:14 +00:00
mame 606208becf * lib/net/smtp.rb (check_continue): raise an error with an explanatory
message.  [ruby-core:35854] [Feature #4598]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 12:55:13 +00:00
naruse dd5ae05b05 * lib/optparse.rb (OptionParser#to_a): should split by end-of-line,
and MUST TEST IT, MUST RUN THE TEST, MUST VERIFY BEFORE BACKPORT.
  [ruby-dev:45568][Bug #6348]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 12:17:05 +00:00
nobu 4f2b00429e * lib/optparse.rb (OptionParser#to_a): should split by end-of-line
[ruby-dev:45568][Bug #6348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 06:51:44 +00:00
nobu a9917efd5d * lib/optparse.rb (OptionParser#to_a): String#to_a is no longer
defined.  [ruby-dev:45568][Bug #6348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 05:54:08 +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
nobu 535a28c737 see OpenSSL::SSL
* lib/net/imap.rb (Net::IMAP): see if actually used SSL is defined to
  get rid of autoloaded OpenSSL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:38 +00:00
nobu cf6116150c autoload in module scope.
* lib/net/http.rb (Net::OpenSSL): get rid of autoload in global scope
  not to make tests confused.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:36 +00:00
nobu 7255d93b08 deal with timeout exceptions
* lib/net/http.rb (Net::HTTP#transport_request): deal with
  Net::OpenTimeout and Net::ReadTimeout first to get rid of loading
  OpenSSL as possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 13:48:31 +00:00
akr c2086cc7ff * lib/drb/ssl.rb: generate 1024 bits RSA key instead of 512 bits.
OpenSSL 1.0.1 rejects 512 bits RSA key for TLS1.2 with SHA512.
  http://rt.openssl.org/Ticket/Display.html?id=2769&user=guest&pass=guest
  reported by Bohuslav Kabrda.
  [ruby-core:43844] [ruby-trunk - Bug #6221]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 11:15:35 +00:00
akr e16e961bab * lib/drb/extservm.rb (DRb::ExtServManager): don't use /bin/sh to
invoke service subprocess.  mark detach threads for clean up.

* test/drb/drbtest.rb: clean up the service subprocess in teardown.

* test/drb/test_drb.rb: set @service_name for teardown.

* test/drb/test_drbunix.rb: ditto.

* test/drb/test_drbssl.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-22 11:35:03 +00:00
akr cc19bcf11f * lib/drb/ssl.rb: close accepted TCP socket if SSL accept is failed.
[ruby-dev:45541]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-21 22:52:23 +00:00
drbrain b68e0dbfdf * lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem: Removed to avoid
conflict with ca-bundle.pem
* lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem:
  ditto.
* lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem:
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-20 03:28:49 +00:00
drbrain 064bf602e0 * lib/rubygems: Update to RubyGems 1.8.23 which contains security
fixes:

  RubyGems now disallows redirection from HTTPS to HTTP.

  RubyGems now verifies SSL connections.

  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
  changes since 1.8.22.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-19 23:07:48 +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
drbrain 5383ccd981 * lib/rubygems/version.rb: Fixed init_with warning by calling into
yaml_initialize (for syck) from psych's init_with


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 00:58:47 +00:00
drbrain 6c1da63bd7 * lib/rubygems: Update to RubyGems 1.8.22 plus r33517 and r35337 which
were ported to the rubygems git repository.

  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
  changes since 1.8.11.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 00:04:12 +00:00
drbrain 0ebe38eedd Revert r35370 due to bad source branch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 21:17:56 +00:00
drbrain 22d9456b79 * lib/rubygems: Update to RubyGems 1.8.22 plus r33517 and r35337 which
were ported to the rubygems git repository.

  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
  changes since 1.8.11.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 20:50:00 +00:00
marcandre b62792e540 * lib/matrix.rb (hermitian?): Bug fix, patch by George Koehler
[Bug #6290] [rubyspec:4b9573d7613]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:17:45 +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
usa e6882349c0 * lib/rubygems/remote_fetcher.rb (Gem::RemoteFetcher#download): should
use File.identical? to chech the identicality of the files.
  this fixed an error of a test on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 00:44:47 +00:00
naruse c26ea74ad6 * lib/webrick/server.rb (WEBrick::GenericServer#start):
partially revert r35315.

* test/webrick/test_server.rb (test_start_exception):
  received signal is delivered to the main thread, so it is needed to
  emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 02:30:43 +00:00
naruse deb0519aec * lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;
this method is to deny new connections, not shutdown yet.

* lib/webrick/server.rb (WEBrick::GenericServer#start):
  re-raise exception only when the exception is Interrupt (^C).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 06:21:50 +00:00
drbrain 655738577f * lib/uri/generic.rb (module URI): URI now downcases the scheme to
follow RFC 2396 section 3.1.  [ruby-trunk - Feature #4551]
* test/uri/test_generic.rb (class URI):  Test for above


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 22:11:07 +00:00
drbrain ea9b6997cc * lib/net/protocol.rb (module Net): Added ReadTimeout to match
OpenTimeout.  ReadTimeout is now raised by rbuf_fill instead of
  Timeout::Error to help users distinguish what type of timeout
  occurred.  [ruby-trunk - Feature #6088]
* lib/net/pop.rb (module Net):  Updated documentation for ReadTimeout
  and OpenTimeout.
* lib/net/http.rb (module Net):  ditto
* lib/net/smtp.rb (module Net):  ditto
* lib/net/telnet.rb (module Net):  Net::ReadTimeout is now raised in
  waitfor to match Net::Protocol.
* test/net/http/test_http.rb:  Updated Timeout::Error expectation to
  Net::ReadTimeout.
* test/net/ftp/test_ftp.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 21:20:51 +00:00
drbrain 8c5c5a221f * lib/webrick/server.rb (module WEBrick::GenericServer): A server
will now continue only when a StandardError subclass is raised.  For
  other exception types the error will be logged at the fatal level and
  the server will safely stop.  Based on a patch by Alex Young.
  [ruby-trunk - Feature #6236]
* test/webrick/test_server.rb:  Test for new exception handling
  behavior.  Join the server thread instead of busy-waiting for it to
  shut down to remove race conditions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 20:28:11 +00:00
naruse ce0223b15b * lib/test/unit.rb (Test::Unit:Runner::Worker#_run_suites):
call GC.start before running the test suites.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 18:55:32 +00:00
drbrain d8164e5724 * lib/abbrev.rb: Clarified that Abbrev.abbrev returns a Hash instead
of an Array.  Patch by Andrei Bocan.  [ruby-trunk - Bug #6107]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 20:15:05 +00:00
naruse b386b25aac * lib/net/http.rb (Net::HTTP#send_request_with_body_stream):
use IO.copy_stream for requests using body_stream.
  patched by Eric Wong. [ruby-core:40898] [Feature #5605]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10 09:23:11 +00:00