Skip to content
Browse files

Adjust to use unless value.nil? instead of if value

  • Loading branch information...
1 parent 22b351f commit 5b9bebd622ebb62dc6a96c21973c7bbac2c1f8a4 @d11wtq d11wtq committed Sep 13, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/dm-core/property/binary.rb
View
4 lib/dm-core/property/binary.rb
@@ -6,11 +6,11 @@ class Binary < String
if RUBY_VERSION >= "1.9"
def load(value)
- super.dup.force_encoding("BINARY") if value
+ super.dup.force_encoding("BINARY") unless value.nil?
end
def dump(value)
- super.dup.force_encoding("BINARY") if value
+ super.dup.force_encoding("BINARY") unless value.nil?
end
end

0 comments on commit 5b9bebd

Please sign in to comment.
Something went wrong with that request. Please try again.