nakajima-nakajima 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,10 @@
1
+ def bench(*args, &block)
2
+ options = args.extract_options!
3
+
4
+ times = options[:times] || 1000
5
+ label = args.first || "running:"
6
+
7
+ t = Benchmark.measure { times.times(&block) }
8
+
9
+ puts "#{label} #{t.real}"
10
+ end
@@ -54,7 +54,7 @@ module Nakajima
54
54
  else
55
55
  ProxyReturningMe.new(self)
56
56
  end
57
- end unless respond_to?(:tap)
57
+ end
58
58
  end
59
59
  end
60
60
  end
data/lib/nakajima.rb CHANGED
@@ -14,5 +14,5 @@ require 'proc'
14
14
  require 'object'
15
15
 
16
16
  module Nakajima
17
- VERSION = '0.0.2'
17
+ VERSION = '0.0.4'
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nakajima-nakajima
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Nakajima
@@ -30,6 +30,15 @@ dependencies:
30
30
  - !ruby/object:Gem::Version
31
31
  version: "0"
32
32
  version:
33
+ - !ruby/object:Gem::Dependency
34
+ name: rr
35
+ version_requirement:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: "0"
41
+ version:
33
42
  description:
34
43
  email: patnakajima@gmail.com
35
44
  executables: []
@@ -40,6 +49,7 @@ extra_rdoc_files: []
40
49
 
41
50
  files:
42
51
  - lib/nakajima
52
+ - lib/nakajima/bench.rb
43
53
  - lib/nakajima/core_ext
44
54
  - lib/nakajima/core_ext/basic_object.rb
45
55
  - lib/nakajima/core_ext/array.rb