From e9a522477ddef081cf1868edc992a5fe19d86745 Mon Sep 17 00:00:00 2001 From: Giallombardo Nathan Date: Wed, 14 Aug 2024 18:53:49 +0200 Subject: [PATCH] fix ruby 3.0 --- lib/couchbase-orm/attributes/dynamic.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/couchbase-orm/attributes/dynamic.rb b/lib/couchbase-orm/attributes/dynamic.rb index afdc8f61..16dae054 100644 --- a/lib/couchbase-orm/attributes/dynamic.rb +++ b/lib/couchbase-orm/attributes/dynamic.rb @@ -15,7 +15,7 @@ module AttributesDynamic # # @return [ true | false ] True if it does, false if not. def respond_to?(name, include_private = false) - super || has_attribute?(name.to_s.reader) + super || attributes.key?(name.to_s.reader) end private @@ -118,7 +118,7 @@ def method_missing(name, *args) getter = attr.reader return super if getter == 'id' - return super if has_attribute?(getter) + return super if attributes.key?(getter) if attr.writer? define_dynamic_writer(getter)