mobj 1.8.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mobj.rb +7 -3
  2. metadata +1 -1
data/lib/mobj.rb CHANGED
@@ -157,12 +157,12 @@ module Mobj
157
157
  alias includes? include?
158
158
  alias contains? include?
159
159
 
160
- def sum(initial = 0.0, op = :+, &block)
160
+ def msum(initial = 0.0, op = :+, &block)
161
161
  map(&:to_f).inject(initial, block ? block : op)
162
162
  end
163
163
 
164
- def avg(&block)
165
- sum(&block) / size
164
+ def mavg(&block)
165
+ msum(&block) / size
166
166
  end
167
167
 
168
168
  def values() self end
@@ -375,6 +375,10 @@ module Mobj
375
375
  end
376
376
  end
377
377
 
378
+ class ::Symbol
379
+ def walk(obj) to_s.walk(obj) end
380
+ end
381
+
378
382
  class ::String
379
383
 
380
384
  def matches(regexp)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 2.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: