webget_ruby_ramp 1.7.7 → 1.7.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -205,7 +205,7 @@ class Hash
205
205
  # h.pivot(:vals){|items| items.join("-") } => {"a"=>"1-4-7","b"=>"2-5-8","c"=>"3-6-9"}
206
206
  # h.pivot(:vals){|items| items.inject{|sum,x| sum+=x } } => {"a"=>12,"b"=>15,"c"=>18}
207
207
 
208
- def pivot(direction='keys')
208
+ def pivot(direction='keys',&block)
209
209
  a=self.class.new
210
210
  direction=direction.to_s
211
211
  up=pivot_direction_up?(direction)
@@ -216,8 +216,8 @@ class Hash
216
216
  a[k]<<(v2)
217
217
  }
218
218
  }
219
- if block_given?
220
- a.each_pair{|k,v| a[k]=(yield v)}
219
+ if block
220
+ a.each_pair{|key,val| a[key]=block.call(val)}
221
221
  end
222
222
  a
223
223
  end
@@ -194,6 +194,7 @@ Extensions that help debug Ruby programs.
194
194
 
195
195
  == Changes
196
196
 
197
+ - 1.7.8 Add rcov testing
197
198
  - 1.7.4 Add Class#publicize_methods, Integer#even?, Integer#odd?
198
199
  - 1.7.3 Refactor Rails classes to their own gem, add README, LICENSE
199
200
  - 1.7.2 Gemcutter update
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webget_ruby_ramp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.7
4
+ version: 1.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - WebGet
metadata.gz.sig CHANGED
Binary file