From a69518bb189e6867ebedbd24799ea6a9956b52d4 Mon Sep 17 00:00:00 2001 From: muflax Date: Sun, 4 Dec 2011 14:38:00 +0100 Subject: [PATCH] coerce properly --- lib/range_math.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/range_math.rb b/lib/range_math.rb index e797040..d008d07 100644 --- a/lib/range_math.rb +++ b/lib/range_math.rb @@ -47,4 +47,8 @@ class Range def average (self.begin + self.end) / 2.0 end + + def coerce(other) + return self, other + end end