lib/polyfill/v2_4/integer/instance/round.rb in polyfill-0.3.0 vs lib/polyfill/v2_4/integer/instance/round.rb in polyfill-0.4.0
- old
+ new
@@ -10,22 +10,20 @@
end
ndigits = ndigits.to_int
return super() if ndigits == 0
return to_f if ndigits > 0
- place = 10 ** -ndigits
- (self.to_f / place).round * place
+ place = 10**-ndigits
+ (to_f / place).round * place
end
end
- if RUBY_VERSION < '2.4.0'
- refine ::Integer do
- include Method
- end
+ refine ::Integer do
+ include Method
+ end
- def self.included(base)
- base.include Method
- end
+ def self.included(base)
+ base.include Method
end
end
end
end
end