aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorVishnu Atrai <me@vishnuatrai.com>2011-12-26 00:34:48 +0530
committerVishnu Atrai <me@vishnuatrai.com>2011-12-26 00:34:48 +0530
commit3f967dc5f910c5ffeae2f397a6b0f499c1eb7540 (patch)
tree59aceec0206318490ffa6b92248c9a69fcb37e4e /activesupport/lib/active_support
parentfc4f56ad05b7a6a9c05d661f8a645286a7d6b0e3 (diff)
downloadrails-3f967dc5f910c5ffeae2f397a6b0f499c1eb7540.tar.gz
rails-3f967dc5f910c5ffeae2f397a6b0f499c1eb7540.tar.bz2
rails-3f967dc5f910c5ffeae2f397a6b0f499c1eb7540.zip
::BasicObject always defined in ruby 19
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/basic_object.rb25
1 files changed, 9 insertions, 16 deletions
diff --git a/activesupport/lib/active_support/basic_object.rb b/activesupport/lib/active_support/basic_object.rb
index 3b5277c205..c3c7ab0112 100644
--- a/activesupport/lib/active_support/basic_object.rb
+++ b/activesupport/lib/active_support/basic_object.rb
@@ -1,21 +1,14 @@
module ActiveSupport
- if defined? ::BasicObject
- # A class with no predefined methods that behaves similarly to Builder's
- # BlankSlate. Used for proxy classes.
- class BasicObject < ::BasicObject
- undef_method :==
- undef_method :equal?
+ # A class with no predefined methods that behaves similarly to Builder's
+ # BlankSlate. Used for proxy classes.
+ class BasicObject < ::BasicObject
+ undef_method :==
+ undef_method :equal?
- # Let ActiveSupport::BasicObject at least raise exceptions.
- def raise(*args)
- ::Object.send(:raise, *args)
- end
- end
- else
- class BasicObject #:nodoc:
- instance_methods.each do |m|
- undef_method(m) if m.to_s !~ /(?:^__|^nil\?$|^send$|^object_id$)/
- end
+ # Let ActiveSupport::BasicObject at least raise exceptions.
+ def raise(*args)
+ ::Object.send(:raise, *args)
end
end
+
end