davidrichards-just_enumerable_stats 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 7
4
+ :patch: 8
@@ -622,13 +622,11 @@ module Enumerable
622
622
  self.covariance(other) / denominator
623
623
  end
624
624
 
625
- protected
626
-
627
- # Some calculations have to have at least floating point numbers. This
628
- # generates a cached version of the operation--only runs once per object.
629
- def to_f!
630
- return true if @to_f
631
- @to_f = self.map! {|e| e.to_f}
632
- end
625
+ # Some calculations have to have at least floating point numbers. This
626
+ # generates a cached version of the operation--only runs once per object.
627
+ def to_f!
628
+ return true if @to_f
629
+ @to_f = self.map! {|e| e.to_f}
630
+ end
633
631
 
634
632
  end
@@ -529,4 +529,8 @@ describe "JustEnumerableStats" do
529
529
  a.pearson_correlation(b).should be_close(0.193649167310371, 1.0e-15)
530
530
  end
531
531
 
532
+ it "should be able to force the list into floats" do
533
+ [1,2,3].to_f!.should eql([1.0, 2.0, 3.0])
534
+ end
535
+
532
536
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: davidrichards-just_enumerable_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Richards