# Define a toplevel class to ensure it is accessible. class ToplevelClass end # Define a toplevel method to ensure it is also accessible. def toplevel_method true end # Define a toplevel method to ensure it is also accessible. def self.toplevel_singleton_method true end