aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/proxy_object.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/proxy_object.rb')
-rw-r--r--activesupport/lib/active_support/proxy_object.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/proxy_object.rb b/activesupport/lib/active_support/proxy_object.rb
new file mode 100644
index 0000000000..0965fcd2d9
--- /dev/null
+++ b/activesupport/lib/active_support/proxy_object.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module ActiveSupport
+ # A class with no predefined methods that behaves similarly to Builder's
+ # BlankSlate. Used for proxy classes.
+ class ProxyObject < ::BasicObject
+ undef_method :==
+ undef_method :equal?
+
+ # Let ActiveSupport::ProxyObject at least raise exceptions.
+ def raise(*args)
+ ::Object.send(:raise, *args)
+ end
+ end
+end