(1) Just because you
require some file from within a scope, does not mean it is evaluated in that scope. The
eval method is a global method defined in the
Kernel mixin module, which is mixed into
It always evaluates files (by default) in the
TOPLEVEL_BINDING (which is “the particular instance of Object called main.”)
(2) Many of the standard library files, actually modify base Ruby classes. FredoTools was written way back when SketchUp was not distro’d with the Full Ruby Standard library. So he may not have anticipated this behavior.
and you’ll see only 2 methods are added to the
Math mixin module. The others modify Ruby base classes.
(3) For some reason I am thinking that perhaps
Mathn has been deprecated ?
(4) What is it you need Mathn for specifically ? So we can come up with a workaround.
(5) What is the error if any that it causes with FredoTools ?