add ** and %
parent
ba1f211b2c
commit
1327bdac58
|
@ -20,6 +20,14 @@ class Range
|
||||||
pair_or_num :/, other.to_f
|
pair_or_num :/, other.to_f
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def **(other)
|
||||||
|
pair_or_num :**, other
|
||||||
|
end
|
||||||
|
|
||||||
|
def %(other)
|
||||||
|
pair_or_num :%, other
|
||||||
|
end
|
||||||
|
|
||||||
def to_f
|
def to_f
|
||||||
(self.begin.to_f..self.end.to_f)
|
(self.begin.to_f..self.end.to_f)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue