Permalink
Browse files

Replace case statement with a simpler equivalent expression

  • Loading branch information...
1 parent b3d5601 commit d83ac2f0bcb343844893c93cf57bea2a8a1c80ce @dkubb dkubb committed Nov 19, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/virtus/attribute/default_value.rb
@@ -77,7 +77,7 @@ def callable?
#
# @api private
def duplicable?
- case value when *DUP_CLASSES then false else true end
+ DUP_CLASSES.none? { |klass| value.kind_of?(klass) }
end
end # class DefaultValue

0 comments on commit d83ac2f

Please sign in to comment.