diff --git a/lib/not_loaded.rb b/lib/not_loaded.rb index d2e4076ac25a6b9a13ff4976b5e94afbb930b2e6..91c654bc812edf0ffe4d8c6b6ac1a7f6d5518ee9 100644 --- a/lib/not_loaded.rb +++ b/lib/not_loaded.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -class NotLoaded - class NotLoadedError < StandardError; end +class NotLoaded < BasicObject + class NotLoadedError < ::StandardError; end def initialize(name) @name = name @@ -12,6 +12,6 @@ class NotLoaded end def method_missing(*) - raise NotLoadedError, "#{@name} not loaded" + ::Kernel.raise NotLoadedError, "#{@name} not loaded" end end