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

4321 Коммитов

Автор SHA1 Сообщение Дата
drbrain 7edb264586 * lib/net/.document: Removed. All files in net/ should be included in
RDoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25 02:20:07 +00:00
naruse ba22341854 * lib/cgi/html.rb: Use << instead of +=.
`a += b` is syntax sugar of `a = a + b`; it creates a new string
  object. `a << b` is concatenation and doesn't create new object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25 00:29:30 +00:00
naruse 347c554f7e * lib/cgi/html.rb (element_init): suppress redefine warning.
Don't define methods if they are already defined.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25 00:19:09 +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
drbrain 505c4eae32 * lib/rubygems: Updated to RubyGems 1.8.24, a bugfix release.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-24 00:31:31 +00:00
akr ab63cdf1ab * lib/open-uri.rb: use respond_to? to test Tempfile.
[ruby-dev:45995] [Bug #6781] reported by hsbt (Hiroshi SHIBATA).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-23 13:49:56 +00:00
naruse e2f75afbfb Set false to @proxy_from_env to suppress uninitialized warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21 15:51:14 +00:00
naruse 07a6d0e9d1 * lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.
* lib/net/http.rb (Net::HTTP.new): set default_port if proxy port is
  not given.

* lib/net/http.rb (Net::HTTP#initialize): ditto.

* lib/net/http.rb (Net::HTTP#proxy?): return true or false.

* lib/net/http.rb (Net::HTTP#proxy_address): check proxy_uri is not nil.

* lib/net/http.rb (Net::HTTP#proxy_port): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21 15:45:10 +00:00
sorah d5a190c942 * lib/test/unit/testcase.rb(method_added): refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21 06:14:24 +00:00
sorah 7773a911f5 * lib/test/unit.rb: warn when test_* method is redefined.
Patch by mame (Yusuke Endoh). [Feature #2643] [ruby-core:27790]

* test/testunit/test_redefinition.rb: Test for above.

* test/testunit/test4test_redefinition.rb: Ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21 05:12:32 +00:00
drbrain c4827de949 * lib/logger.rb: Updated example in Logger comment to match other
examples and fixed a bug.  Patch by Marcus Stollsteimer.
  [Bug #6759]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20 23:41:51 +00:00
drbrain 9416becda4 * lib/net/http.rb: Net::HTTP now automatically detects and uses
proxies from the environment.  A proxy may also be specified as
  before.

  Net::HTTP::Proxy still creates anonymous classes, but these classes
  are only used to store configuration information.  When an HTTP
  instance is created the configuration is now copied.

  Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP

  [Feature #6546]
* lib/open-uri.rb:  Moved URI::Generic#find_proxy to uri/generic.
* lib/uri/generic.rb:  Imported find_proxy from open-uri.
* test/open-uri/test_open-uri.rb:  Moved proxy-discovery tests to URI.
* test/uri/test_generic.rb:  Imported proxy-discovery tests from
  open-uri.
* test/net/http/test_http.rb:  Added tests for proxy behavior.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20 01:56:21 +00:00
drbrain b1a0509b54 * lib/net/http/response.rb: Automatically inflate gzip and
deflate-encoded response bodies.  [Feature #6942]
* lib/net/http/generic_request.rb:  Automatically accept gzip and
  deflate content-encoding for requests.  [Feature #6494]
* lib/net/http/request.rb:  Updated documentation for #6494.
* lib/net/http.rb:  Updated documentation for #6492 and #6494, removed
  Content-Encoding handling now present in Net::HTTPResponse.
* test/net/http/test_httpresponse.rb:  Tests for #6492
* test/net/http/test_http_request.rb:  Tests for #6494
* test/open-uri/test_open-uri.rb (test_content_encoding):  Updated test
  for automatic content-encoding handling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19 22:43:38 +00:00
nobu ea3edd2744 mkmf.rb: fix typo
* lib/mkmf.rb (configuration): fix typo, should never return nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 12:07:19 +00:00
nobu 5a03c25690 mkmf.rb: hack for -framework
* lib/mkmf.rb (have_framework): get rid of separating -framework
  option and its argument and dealing with the argument as a library
  or an object name.  if $LDFLAGS were an array...


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 07:17:43 +00:00
nobu 6684ade9a3 configure.in: EXTDLDFLAGS
* configure.in (EXTDLDFLAGS): split options for each extension
  libraries, and unused in ruby.pc.  [Bug #6734]
* lib/mkmf.rb (MakeMakefile#configuration): add EXTDLDFLAGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 05:53:23 +00:00
naruse 39b33658e3 * lib/benchmark.rb: Fix Benchmark.benchmark output with an empty
caption.  patched by Benoit Daloze. [ruby-core:45719] [Bug #6610]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 03:56:58 +00:00
drbrain 9844bc02a0 * lib/debug.rb: Added toplevel documentation. Based on patch by Oscar
Del Ben.  [Bug #6743], fixes #146 on github.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 01:02:12 +00:00
drbrain fe6aa0e16a * lib/logger.rb: Updated typos and output to match modern Logger
output.  Patch by Marcus Stollsteimer.  [Bug #6738]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18 00:27:04 +00:00
xibbar c47cca2f85 Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/util.rb (CGI.escapeHTML,unescapeHTML): Add &apos; for HTML5 escaping.
    [Feature #6620]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-17 23:04:46 +00:00
ayumin b69f55a673 * lib/open-uri.rb: delete space.
* test/psych/test_alias_and_anchor.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-17 16:13:10 +00:00
akr cb0d480532 * lib/open-uri.rb: call io.close! for Tempfile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-17 13:17:49 +00:00
ayumin e6021a1be2 * lib/fileutils.rb (uptodate?): remove useless parameter.
patched by Oscar Del Ben.[Bug #6708][ruby-core:46256]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-16 08:15:05 +00:00
nobu 03e5fb6054 test/unit.rb: use uniq!
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): use
  Array#uniq!.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14 07:16:50 +00:00
nobu cbbe2cbca4 test/unit.rb: extract deal
* lib/test/unit.rb (Test::Unit::Runner#deal): deal tasks to workers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14 07:16:43 +00:00
nobu 688f2e1a89 test/unit.rb: extract quit_workers
* lib/test/unit.rb (Test::Unit::Runner#quit_workers): close and kill
  all workers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14 07:16:38 +00:00
nobu 4bbb49b848 test/unit.rb: extract delete_worker
* lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead
  worker from working set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14 07:16:33 +00:00
nobu 4633ad5d0f test/unit.rb: launch_worker to manage new worker
* lib/test/unit.rb (Test::Unit::Runner#launch_worker): add new worker
  to working set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14 07:16:29 +00:00
nobu e9f68d7f69 test/unit.rb: extract launch_worker
* lib/test/unit.rb (Test::Unit::Runner#launch_worker): extract.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14 07:16:24 +00:00
nobu f098306036 test/unit.rb: extract start_watchdog
* lib/test/unit.rb (Test::Unit::Runner#start_watchdog): extract.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14 07:16:19 +00:00
nobu b789a6b4d6 test/unit.rb: _run_parallel
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move
  initializations with nothing to release outside begin/ensure.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-14 07:16:14 +00:00
nobu d57103b9a2 test: dots from a worker
* lib/test/unit.rb (Test::Unit::StatusLineOutput#print): sometimes
  dots from a worker get stuck.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-12 21:11:23 +00:00
nobu b788ff5cf1 test: unnecessary job_status
* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): no needs to
  override job_status option unnecessarily.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-12 21:11:19 +00:00
nobu e8f714b634 test: separate each outputs
* lib/test/unit.rb (Test::Unit::Runner#del_status_line): separate each
  outputs if not replace mode.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-12 21:11:14 +00:00
ryan 9696b3eb16 Imported minitest 3.2.0 (r7598). Reviewed by drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11 23:52:04 +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
nobu 37c8b68555 mkmf.rb: add TARGET_NAME
* configure.in (DLDFLAGS): use TARGET_ENTRY to specify an entry point
  instead of TARGET which may contain non-identifer characters.
* lib/mkmf.rb (create_makefile): add TARGET_NAME which is the first
  part consists of only word characters.  [ruby-core:46248][Bug #6709]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-09 04:28:40 +00:00
nobu cf06ed4f52 suppress warning
* lib/test/unit.rb (terminal_width): suppress uninitialized instance
  variable warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-07 21:38:07 +00:00
nobu 1474cfa846 obsolete Config
* lib/rbconfig/obsolete.rb (Config): remove obsolete Config.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-06 03:27:10 +00:00
knu be53f329f7 Fix 4xx classes to inherit correctly from Net::HTTPClientError
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-05 03:31:31 +00:00
xibbar 067b6e8237 Wed Jul 4 13:38:12 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/util.rb: revert 36299: &apos; is XML specification.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-04 04:42:35 +00:00
xibbar 9c746e35ad Wed Jul 4 08:45:41 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/core.rb: fix bug: When query parameter is 'id=123&id',
    cgi['id'] => '123' is correct. First parameter is valid.
    [Feature #6621]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-04 04:42:32 +00:00
xibbar 07132e0675 Wed Jul 4 08:24:28 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/util.rb: Add &apos; to CGI's HTML escaping.[Feature #6620]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03 23:32:33 +00:00
xibbar ad187bde9c Wed Jul 4 08:18:01 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/html.rb: fix some elements to upper case.[Bug #6632]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03 23:19:29 +00:00
xibbar b25f743057 Wed Jul 4 08:11:15 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/core.rb,html.rb: fix typo.[Bug #6632]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03 23:19:26 +00:00
naruse 66d0ad3607 Undef on_parallel_worker? before redefine.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03 02:11:01 +00:00
naruse d42df49146 * lib/test/unit/parallel.rb: workaround fix for rubygems.
RubyGems can't find rake if the source directory is not equal to
  the directory which is running the test. [Bug #6604]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-28 20:11:19 +00:00
kazu c686986220 NotImplementError is not exist.
* lib/racc/parser.rb: NotImplementError is not exist.
* lib/irb/output-method.rb (IRB::OutputMethod#print): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27 14:18:26 +00:00
nobu 48fc312150 lib/test/unit.rb: show file count in parallel mode
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): show file count
  in parallel mode.  since worker processes run tests per files, the
  parent process cannot tell how many tests will be run in advance.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-22 12:45:12 +00:00
nobu 6e4c82607b lib/test/unit.rb: initialize ivar
* lib/test/unit.rb (Test::Unit::Runner#del_status_line): initialize
  @status_line_size if needed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-22 12:45:08 +00:00