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

5427 Коммитов

Автор SHA1 Сообщение Дата
glass a4645e5612 * lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError when
uri doesn't respond to #to_str. [ruby-core:64453] [Bug #10150]

* test/uri/test_parser.rb: test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27 03:13:22 +00:00
ayumin 1ddf81134b * lib/matrix.rb: Fix docs. Patched by Ben Woodall. [GH-726]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-24 22:54:10 +00:00
nobu 2e2522ecdf tmpdir.rb: explicit conversion to string
* lib/tmpdir.rb (Dir::Tmpname#make_tmpname): convert prefix and
  suffix to strings explicitly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-22 04:44:19 +00:00
akr 6a7d389ed0 * lib/drb/drb.rb: Support graceful shutdown.
(DRbTCPSocket#initialize): Create a pipe for shutdown notification.
  (DRbTCPSocket#close): Invoke close_shutdown_pipe.
  (DRbTCPSocket#close_shutdown_pipe): New private method.
  (DRbTCPSocket#accept): Use accept_or_shutdown.
  (DRbTCPSocket#accept_or_shutdown): New private method which returns
  nil on shutdown.
  (DRbServer#stop_service): Use shutdown instead of Thread#kill.
  (DRbServer#run): Break infinite loop when main_loop returns nil.
  (DRbServer#main_loop): @protocol.accept may return nil.

* lib/drb/ssl.rb: Follow above change.

* lib/drb/unix.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-21 17:06:05 +00:00
glass 5be5db6350 * lib/csv.rb: avoid unnecessary object allocations.
patch is from Andrew Vit. [ruby-core:63215] [Feature #9952]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-21 03:21:17 +00:00
hsbt be1206c0ac * lib/rexml/**/*.rb: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-21 03:10:27 +00:00
nobu a718be06fa tempfile.rb: fix r47655
* lib/tempfile.rb (Tempfile#initialize, Tempfile.create): get rid of
  shadowing local variables.

* lib/tmpdir.rb (Dir::Tmpname#make_tmpname): simlify argument
  splitting.

* test/test_tempfile.rb: need thread library for ConditionVariable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-21 01:40:21 +00:00
glass 09e91be9ab * lib/tempfile.rb: define parameters appropriately and some
refactoring.

* lib/tmpdir.rb:   ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-20 17:35:06 +00:00
naruse e37aab94da * lib/uri/rfc3986_parser.rb: specify a regexp for :OPAQUE; generic.rb
assumes it is present, and will refuse all values otherwise.
  by Matthew Draper <matthew@trebex.net>
  https://github.com/ruby/ruby/pull/718 fix GH-718

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-17 14:15:03 +00:00
hsbt 4de117a615 * lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)
Complete history at:
  https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216
* test/rubygems:  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-14 03:30:02 +00:00
normal b8eec6b691 lib/benchmark.rb: remove CLOCK_MONOTONIC_RAW support
In addition to being unaffected by _offset_ correction,
CLOCK_MONOTONIC_RAW is also unaffected by _frequency_ correction,
making it unsuitable for measuring real time on systems where the
clock is always running too fast or slow.

CLOCK_MONOTONIC (without _RAW) is the correct clock, as it is unaffected
by _offset_ correction (due to human error or battery replacement), but
still takes _frequency_ correction into account for clocks which
consistently run too fast or slow.

Thanks to Vít Ondruch for reporting the issue on ARM [Bug #10202]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11 08:09:07 +00:00
hsbt 80325bab52 * lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(21b241a)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11 01:03:22 +00:00
nobu 097c3e9cbb mkmf.rb: -I flags to $INCFLAGS
* lib/mkmf.rb (MakeMakefile#pkg_config): separate -I flags to
  $INCFLAGS, which is used by CPP.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09 00:27:34 +00:00
nobu 5be82d1487 mkmf.rb: --cflags to $CXXFLAGS
* lib/mkmf.rb (MakeMakefile#pkg_config): append --cflags to also
  $CXXFLAGS, as they are often used by C++ compiler.
  [ruby-core:54532] [Bug #8315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09 00:02:08 +00:00
svn ac231ef271 * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-06 09:31:52 +00:00
hsbt f6d2b48588 * lib/rake.rb, lib/rake/*, test/rake/*: Update latest rake master(e47d023)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-06 09:31:37 +00:00
zzak f0ee1e67d3 * lib/rdoc/generator/template/darkfish/js/jquery.js: Backport
rdoc/rdoc@74f60fcb04


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 23:46:11 +00:00
hsbt 925ac7ade7 * lib/shellwords.rb: proofreading documentation.
[Bug #10155][ruby-core:64471]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 10:00:46 +00:00
hsbt 8fada42082 * lib/rdoc/generator/pot/po.rb: fixed broken tests for trailing whitespace.
* test/rdoc/test_rdoc_generator_pot.rb: ditto.
* test/rdoc/test_rdoc_generator_pot_po.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 02:10:17 +00:00
svn ce18f59a93 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 01:41:44 +00:00
hsbt d42d6e690e * lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 01:41:25 +00:00
akr 8bd2d31d45 * lib/benchmark.rb: Fix a syntax error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-31 07:59:12 +00:00
nobu cf990c5ace benchmark.rb: Process::CLOCK_MONOTONIC_RAW may be unavailable
* lib/benchmark.rb (BENCHMARK_CLOCK): Process::CLOCK_MONOTONIC_RAW
  is not supported on old linux.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-31 06:05:43 +00:00
nobu 4274b7975e benchmark.rb: prefer Process::CLOCK_MONOTONIC_RAW
* lib/benchmark.rb (BENCHMARK_CLOCK): prefer Process::CLOCK_MONOTONIC_RAW
  if available to more accurate measure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-30 06:15:22 +00:00
glass c4ad649e07 * lib/tempfile.rb: remove "require 'thread'". its features are no
longer used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-27 14:36:25 +00:00
hsbt e47fec1f86 * lib/drb/acl.rb: Removed meaningless #to_s methods in interpolation.
[Feature #10174][ruby-core:64584]
* lib/erb.rb: ditto.
* lib/observer.rb: ditto.
* lib/rake/invocation_chain.rb: ditto.
* lib/rubygems/command_manager.rb: ditto.
* lib/rubygems/config_file.rb: ditto.
* lib/uri/common.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-27 12:21:41 +00:00
hsbt 3e8515bf36 * lib/drb/drb.rb: use attr_reader instead of Module#attr.
[Feature #10172][ruby-core:64582]
* lib/irb/ruby-token.rb: ditto.
* lib/net/telnet.rb: ditto.
* lib/rdoc/ruby_token.rb: ditto.
* lib/thwait.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-27 12:10:21 +00:00
nobu 63683cb46d lib/mathn.rb: remove built-in methods
* lib/mathn.rb (Fixnum#**, Bignum#**, Float#**, Rational#**):
  remove as these are now built-in.  [ruby-core:63973] [Bug #10086]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-26 12:07:57 +00:00
hsbt 1f48a3382b * lib/shell/process-controller.rb: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-26 02:44:26 +00:00
hsbt f4e5a6f083 * lib/thwait.rb (ThreadsWait): removed needless constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-26 02:39:43 +00:00
hsbt fb66bf2dd8 * lib/mathn.rb: mathn library is deprecated on ruby 2.2.
[Feature #10169][ruby-core:64553]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-26 00:31:00 +00:00
hsbt daa90738c4 * lib/mathn.rb: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-26 00:25:27 +00:00
nobu 682f3a7881 uri/common.rb: use negative look-ahead
* lib/uri/common.rb (URI.decode_www_form_component): use negative
  look-ahead instead of nested repeat operators, to get rid of
  backtrack explosion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-25 07:29:50 +00:00
nobu 2bded596ec logger.rb: simplify
* lib/logger.rb (format_datetime): simplify and freeze the default
  format so that it can be shared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-25 04:03:33 +00:00
nobu 51560a8737 lib/logger.rb: use %N
* lib/logger.rb (format_datetime): use "%6N" to show microsecond.
  [Fix GH-704]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-25 03:56:53 +00:00
hsbt 2afed6ecef * lib/e2mmap.rb: remove needless instance variables.
* lib/irb.rb: ditto.
* lib/irb/**/*.rb: ditto.
* lib/shell.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-24 07:16:25 +00:00
normal 03fa0c4986 lib/benchmark.rb (measure): reduce allocations as in r47260
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-24 02:10:28 +00:00
normal 249bd1ed2a lib/benchmark.rb: speedup by reducing allocations
* lib/benchmark.rb (module Benchmark): define BENCHMARK_CLOCK
  (realtime): use Process.clock_gettime(BENCHMARK_CLOCK)
  [Feature #10165]

* test/benchmark/test_benchmark.rb (test_realtime_output): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-24 02:03:06 +00:00
hsbt 4c91cbb9a8 * lib/shell.rb: removed commented-out code.
* lib/shell/builtin-command.rb: ditto.
* lib/shell/command-processor.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-22 03:32:36 +00:00
hsbt 6f74ab1d97 * lib/complex.rb: removed deprecated library.
* lib/rational.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-22 03:21:55 +00:00
hsbt a84821f8dd * lib/prettyprint.rb: removed PrettyPrint#first?
because it is obsoleted method since Ruby 1.8.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-22 02:38:59 +00:00
hsbt 4d9de3db0a * lib/e2mmap.rb: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 05:45:47 +00:00
hsbt 59ca946543 * lib/rinda/ring.rb: split executable code into sample directory.
* sample/rinda-ring.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 04:23:56 +00:00
hsbt bff692b94d * lib/drb/acl.rb: split executable code into sample directory.
* sample/drb/acl.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 04:23:43 +00:00
hsbt ef4c25720a * lib/net/imap.rb: split executable code into sample directory.
* sample/net-imap.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 03:40:42 +00:00
hsbt c6efc649f8 * lib/net/imap.rb: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 03:24:06 +00:00
nobu d0f71e5072 rake/backtrace.rb: exclude mere prefix
* lib/rake/backtrace.rb (Rake::Backtrace): exclude mere prefix and
  exec_prefix, which match too much.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-16 03:56:17 +00:00
nobu 04408eae54 rake/backtrace.rb: remove wrong value
* lib/rake/backtrace.rb (Rake::Backtrace::SYS_KEYS): only names
  end with prefix or libdir, not just include them.  libdirname is
  not a key of path name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-16 03:48:21 +00:00
hsbt e5c9e56893 * lib/gserver.rb: removed unmaintained code.
[ruby-core:40313][Feature #5480]
* lib/xmlrpc/httpserver.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-15 01:21:18 +00:00
hsbt 643551f0d3 * lib/irb/completion.rb: reverted r47163.
because another case can't be show completion target.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-13 03:02:26 +00:00