primalize 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/primalize/single.rb +2 -2
- data/lib/primalize/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e36f2c4e228676c3b667327dd6ac82cb5a35d6eb
|
4
|
+
data.tar.gz: f3787f3ea335597dc61dd7fe3b461c9e7076f3db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: feac9b17d4d74fc748c9e1289b9173ec8782fc3b8a31e2a859c3d5c2281e03deddf02acfb173860c8eab36c0aac23a1e7966dd795b8c0cb50339baac7d1f8214
|
7
|
+
data.tar.gz: b04714ce166db915086c6da5905ea69e568780015ce7234d02821128c89bb9893c97407f05e4ed89e0dbe13f50f1ee4971a0d68ddf99ca9e7ae14cb46c287ba4
|
data/lib/primalize/single.rb
CHANGED
@@ -292,10 +292,10 @@ module Primalize
|
|
292
292
|
|
293
293
|
def initialize primalizer, &coercion
|
294
294
|
@primalizer = primalizer
|
295
|
-
@coercion =
|
295
|
+
@coercion = proc do |obj|
|
296
296
|
# FIXME: this is dumb
|
297
297
|
begin
|
298
|
-
primalizer.new(obj).call
|
298
|
+
primalizer.new((coercion || DEFAULT_COERCION).call(obj)).call
|
299
299
|
rescue ArgumentError => e
|
300
300
|
raise TypeError.new(e)
|
301
301
|
end
|
data/lib/primalize/version.rb
CHANGED