Skip to content

Commit

Permalink
merge revision(s) 15369:
Browse files Browse the repository at this point in the history
	* 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/branches/ruby_1_8_6@17123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
shyouhei committed Jun 13, 2008
1 parent 7dce7a4 commit d68010a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Jun 13 11:57:46 2008 Yukihiro Matsumoto <matz@ruby-lang.org>

* lib/benchmark.rb (Benchmark::realtime): make Benchmark#realtime
a bit faster. a patch from Alexander Dymo <dymo@ukrpost.ua> in
[ruby-core:15337].

Fri Jun 13 11:50:59 2008 Yukihiro Matsumoto <matz@ruby-lang.org>

* io.c (rb_open_file): should check NUL in path.
Expand Down
5 changes: 4 additions & 1 deletion lib/benchmark.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ def measure(label = "") # :yield:
# Returns the elapsed real time used to execute the given block.
#
def realtime(&blk) # :yield:
Benchmark::measure(&blk).real
r0 = Time.now
yield
r1 = Time.now
r1.to_f - r0.to_f
end


Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-13"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080613
#define RUBY_PATCHLEVEL 170
#define RUBY_PATCHLEVEL 171

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
Expand Down

0 comments on commit d68010a

Please sign in to comment.