From 6ee03a40bbb95c68d7517098b1e215f08ad82fb5 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Fri, 7 Dec 2012 14:13:56 -0500 Subject: Rename ActiveSupport::BasicObject to ActiveSupport::ProxyObject AS::BasicObject is used for proxy classes. Let's give it a less concerning name. Also, it avoids the confusion with Ruby's Basic Object. --- activesupport/lib/active_support/proxy_object.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 activesupport/lib/active_support/proxy_object.rb (limited to 'activesupport/lib/active_support/proxy_object.rb') diff --git a/activesupport/lib/active_support/proxy_object.rb b/activesupport/lib/active_support/proxy_object.rb new file mode 100644 index 0000000000..a2bdf1d790 --- /dev/null +++ b/activesupport/lib/active_support/proxy_object.rb @@ -0,0 +1,13 @@ +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::BasicObject at least raise exceptions. + def raise(*args) + ::Object.send(:raise, *args) + end + end +end -- cgit v1.2.3