From cd679c66415a03f163599a1ac37b33d977295b62 Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Thu, 19 Jun 2008 19:34:52 -0500 Subject: [PATCH] Only undef the id method on ACL and Owner if it is currently defined to play better with third party libraries --- lib/aws/s3/acl.rb | 2 +- lib/aws/s3/owner.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/aws/s3/acl.rb b/lib/aws/s3/acl.rb index 9452e77..334e6e9 100644 --- a/lib/aws/s3/acl.rb +++ b/lib/aws/s3/acl.rb @@ -385,7 +385,7 @@ def build class Grantee include SelectiveAttributeProxy #:nodoc: - undef_method :id # Get rid of Object#id + undef_method :id if method_defined?(:id) # Get rid of Object#id def initialize(attributes = {}) # Set default values for attributes that may not be passed in but we still want the object diff --git a/lib/aws/s3/owner.rb b/lib/aws/s3/owner.rb index 5033810..e628f0f 100644 --- a/lib/aws/s3/owner.rb +++ b/lib/aws/s3/owner.rb @@ -7,7 +7,7 @@ module S3 # # You can retrieve the owner of the current account by calling Owner.current. class Owner - undef_method :id # Get rid of Object#id + undef_method :id if method_defined?(:id) # Get rid of Object#id include SelectiveAttributeProxy class << self