mathn.rb is removed from stdlib https://github.com/ruby/ruby/blob/v2_5_0_preview1/NEWS#stdlib-compatibility-issues-excluding-feature-bug-fixes
@@ -103,6 +103,11 @@ if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
stdlib.delete('mkmf')
stdlib.delete('objspace')
stdlib.delete('sdbm')
+else
+ require 'rubygems/version'
+ if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create('2.5')
+ stdlib.delete('mathn')
+ end
end
result = 'ok'