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

30 Коммитов

Автор SHA1 Сообщение Дата
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 b2b93d4be1 * lib/benchmark.rb: Updated formatting of Benchmark documentation for
consistency.  [ruby-trunk - Bug #6533]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-08 22:56:17 +00:00
ktsj c3749b6a6d * ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
  lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
  lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
  lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
  lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
  lib/shell/command-processor.rb, lib/shell/process-controller.rb,
  lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
  arguments to avoid creating Proc objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 07:37:47 +00:00
naruse 4870feb31a * lib/benchmark.rb: merge eregon/benchmark.
https://github.com/eregon/ruby/tree/benchmark
  patched by Benoit Daloze. [ruby-core:37593] [Bug #4940]

* lib/benchmark (Benchmark#bmbm): bmbm should be consistent with bm
  for the return value.

* test/benchmark: remove preemptive test instead of skipping
  I removed the preemptive test I wrote for Feature #4197.
  I'll add it back when the implementation will be able to satisfy it.

* lib/benchmark (Benchmark#bmbm): remove useless explicit call,
  #format is an alias of #to_s test/benchmark: add a test for
  format of long time.

* lib/benchmark: fix label width: always add 1 to ensure there is a
  space delimiter even with times over 100s
  When I asked for Feature #4197, I wanted to make delimiting spaces
  consistent for #bm and #bmbm.
  But with times over 100s, the output contains no space between the
  label and the first time (user).
  Now both ensure there is always a space, even if that means 3 spaces
  with times under 10s (because it is formatted as %10.6f)

* test/benchmark: let labels be a constant
  lib/benchmark (Benchmark#realtime): avoid creating an unused Proc
  lib/benchmark (Benchmark#benchmark): use ensure clause to restore
  STDOUT.sync, as in #bmbm

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-28 06:09:46 +00:00
drbrain 105a9e036c * lib/benchmark.rb: Document Benchmark::Tms#memberwise. Patch by
David Czarnecki.  [Ruby 1.9 - Bug #4873]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 22:47:28 +00:00
drbrain 5bf1c145d4 * lib/benchmark.rb: Restore nodoc for Benchmark::Job and
Benchmark::Report.  [Ruby 1.9 - Bug #4726]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25 00:38:30 +00:00
nobu d371e3583e * lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19 00:07:25 +00:00
drbrain b205e55953 * lib/benchmark.rb: Fix indentation.
* lib/net/imap.rb:  Fix indentation of regular expressions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 22:07:09 +00:00
drbrain 7bbf2f3085 * lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style
	  Patch by Steve Klabnik [Ruby 1.9 - Bug #4730]
	  Patch by Jason Dew [Ruby 1.9 - Feature #4718]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:19:18 +00:00
nobu 7dd49ed5a7 * lib: remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 14:09:38 +00:00
drbrain 0d014df637 * lib/benchmark.rb: Remove nodoc from Benchmark::Job and
Benchmark::Report.  Patch by Sandor Szücs.  [Ruby 1.9 - Bug #4726]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-17 20:42:25 +00:00
nagachika b50d85ebc6 * lib/benchmark.rb (Benchmark#bmbm): use ensure clause instead of
Object#tap to restore STDOUT.sync.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-07 14:01:01 +00:00
naruse 979ec8df5d * lib/benchmark.rb: fix benchmarck to work with current ruby.
patched by Benoit Daloze [ruby-core:33846] [ruby-dev:43143]
  merged from https://github.com/eregon/ruby/commits/benchmark

*  lib/benchmark (Report#width): update documentation
*  lib/benchmark: document the return value of #benchmark and the
   :list attribute in Report
*  lib/benchmark (Tms#format): rename variables, use String#%
   instead of Kernel.format
*  lib/benchmark: remove undocumented Benchmark::times (an alias
   of Process::times used twice)
*  lib/benchmark (#benchmark): use label_width for the caption
*  lib/benchmark (Tms#initialize): rename variables
*  lib/benchmark: allow title to not be a String and call #to_s
*  lib/benchmark (Benchmark#bm): return an Array of the times with
   the labels
*  lib/benchmark: correct output for Benchmark#bmbm
   (remove the extra space)
*  lib/benchmark: add a few tests for Benchmark::Tms output
*  lib/benchmark: improve style (enumerators, ljust, unused vars)
*  lib/benchmark: add spec about output and return value
*  lib/benchmark: improve basic style and consistency
   no parenthesis for print and use interpolation instead of printf
*  lib/benchmark: remove unnecessary conversions and variables
*  lib/benchmark: correct indentation
*  lib/benchmark: rename the FMTSTR constant and variable to FORMAT
*  lib/benchmark: remove useless exception

*  test/benchmark: remove unused variable warnings

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 16:11:06 +00:00
marcandre f3e3547407 * lib/*.rb: Remove unused variable warnings.
Patch by Run Paint [ruby-core:30991]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 20:59:01 +00:00
kazu fe0aab0911 * lib/benchmark.rb (Benchmark::Tms#add): fix NameError.
[ruby-dev:40906]

* test/benchmark/test_benchmark.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02 18:22:29 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
gotoken 208b52a3d3 update rdoc [ruby-core:20407] #835
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 15:49:58 +00:00
naruse a336e6ebd1 * lib/benchmark.rb (Job::Benchmark#item): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-10 15:29:00 +00:00
matz 6445ddf14a * lib/benchmark.rb (Benchmark::realtime): make Benchmark#realtime
a bit faster.  a patch from Alexander Dymo <dymo@ukrpost.ua> in
  [ruby-core:15337].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-02 11:09:24 +00:00
nobu 44475bb208 * lib/benchmark.rb (Benchmark::Job::item): avoid modifying the
argument unintentionally.  [ruby-talk:253676]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-31 08:26:31 +00:00
nobu 92f0be2037 * dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,
lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb,
  lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb,
  lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb,
  lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb,
  lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb,
  lib/rinda/tuplespace.rb, lib/shell/command-processor.rb,
  lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb,
  lib/test/unit/testsuite.rb: typo fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-18 23:19:47 +00:00
dave fb24225154 Tidy benchmark.rb documentation a tad
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-20 06:20:59 +00:00
gsinclair fc5df64667 Converted RD to RDoc (Lyle Johnson) and improved documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-19 06:39:07 +00:00
nobu 4347eb8a7f * lib/benchmark.rb (Benchmark::bm): get rid of warning.
[ruby-talk:69124]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11 01:51:14 +00:00
matz d093279888 * hash.c (env_reject_bang): untaint key string.
* hash.c (env_delete_m): execute block only if deleting key does
  not exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-31 02:06:23 +00:00
akr 0977fe1705 * instruby.rb, ext/extmk.rb, lib/benchmark.rb, lib/cgi.rb,
lib/debug.rb, lib/getoptlong.rb, lib/optparse.rb, lib/time.rb,
  lib/date/format.rb, lib/irb/ruby-lex.rb lib/uri/common.rb: revert
  escape for `-' in character class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29 06:39:50 +00:00
akr 58ef7c2088 * regex.c (re_compile_pattern): fix previous change.
* instruby.rb, ext/extmk.rb, ext/tk/lib/tk.rb, lib/benchmark.rb,
  lib/cgi.rb, lib/debug.rb, lib/getoptlong.rb, lib/jcode.rb,
  lib/optparse.rb, lib/time.rb, lib/date/format.rb,
  lib/irb/ruby-lex.rb: escape `[', `]', `-' in chracter class in
  regexp to avoid warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-21 15:13:23 +00:00
gotoken c66a0f7cc6 exiled historical RD inclusion, wrong [ruby-dev:19191]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-25 17:22:58 +00:00
gotoken 4ec25bdd63 discarded unused parameter
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-24 19:14:59 +00:00
matz 997b69cb6a * re.c (rb_reg_match): should clear $~ if operand is nil.
* re.c (rb_reg_match2): ditto.

* configure: merge Jonathan Baker's large file support patch
  [ruby-talk:35316], with read_all patch in [ruby-talk:35470].

* eval.c (rb_f_abort): optional message argument that be printed
  on termination. [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 06:23:46 +00:00