>   # Defining a module in one file
>    module M
>      module_function  # <<<<<<<<< HERE
>      def f(x)
>        ....
>      end
>    end

Thank you, this is indeed one solution to my problem (though in the
end, I'm going to stick with Michael Hollins' proposal).

Ronald