Commit 657f347d authored by AlexWayfer's avatar AlexWayfer

Added Range with #include?(Range) method

parent 4adc2f2a
Gem::Specification.new do |s|
s.name = 'gorilla-patch'
s.version = '0.0.13'
s.version = '0.0.14'
s.date = Date.today.to_s
s.summary = 'Monkey patch, Core extensions'
s.description = 'Refine Ruby Core classes.'
......
module GorillaPatch
## Refine Array class
module RangeExt
refine Range do
def include?(value)
return super unless value.is_a? Range
super(value.first) && super(value.last)
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment