lib/polyfill.rb in polyfill-1.7.0 vs lib/polyfill.rb in polyfill-1.8.0

- old
+ new

@@ -201,9 +201,16 @@ mod.module_exec(requested_instance_methods) do |methods_added| base_objects.each do |klass| refine Object.const_get(klass, false) do include instance_module + # Certain Kernel methods are private outside of Kernel + if klass == 'Object' + %i[Complex Float Integer Rational].each do |method| + private method if methods_added.include?(method) + end + end + if native Polyfill::InternalUtils.ignore_warnings do define_method :respond_to? do |name, include_all = false| return super(name, include_all) unless methods_added.include?(name)