Skip to content

Commit 3232e8d

Browse files
etiennebarriebyroot
andcommitted
Stop checking for OpenStruct#[] and #[]=
Co-authored-by: Jean Boussier <[email protected]>
1 parent a9e05d6 commit 3232e8d

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/json/generic_object.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ def to_hash
5252
table
5353
end
5454

55-
def [](name)
56-
__send__(name)
57-
end unless method_defined?(:[])
58-
59-
def []=(name, value)
60-
__send__("#{name}=", value)
61-
end unless method_defined?(:[]=)
62-
6355
def |(other)
6456
self.class[other.to_hash.merge(to_hash)]
6557
end

0 commit comments

Comments
 (0)