lib/polyfill/v2_4/comparable/clamp.rb in polyfill-0.1.0 vs lib/polyfill/v2_4/comparable/clamp.rb in polyfill-0.2.0
- old
+ new
@@ -10,25 +10,21 @@
return min if min > self
return max if max < self
self
end if RUBY_VERSION < '2.4.0'
-
- def respond_to?(method, *)
- return true if method.to_sym == :clamp
-
- super
- end if RUBY_VERSION < '2.4.0'
end
- refine ::Numeric do
- include Method
- end
- refine ::String do
- include Method
- end
- refine ::Time do
- include Method
+ if RUBY_VERSION < '2.4.0'
+ refine ::Numeric do
+ include Method
+ end
+ refine ::String do
+ include Method
+ end
+ refine ::Time do
+ include Method
+ end
end
end
end
end
end