diff --git a/lib/phobos/deep_struct.rb b/lib/phobos/deep_struct.rb
index <HASH>..<HASH> 100644
--- a/lib/phobos/deep_struct.rb
+++ b/lib/phobos/deep_struct.rb
@@ -16,9 +16,10 @@ module Phobos
     end
 
     def to_deep_struct(v)
-      if v.is_a?(Hash)
+      case v
+      when Hash
         self.class.new(v)
-      elsif v.is_a?(Array)
+      when Enumerable
         v.map { |el| to_deep_struct(el) }
       else
         v
Moved from if-elseif to case