Skip to content

Instantly share code, notes, and snippets.

@mdkent
Created January 11, 2010 18:24
Show Gist options
  • Save mdkent/274453 to your computer and use it in GitHub Desktop.
Save mdkent/274453 to your computer and use it in GitHub Desktop.
--- lib/deep_merge.rb.orig 2010-01-11 10:15:52.000000000 -0800
+++ lib/deep_merge.rb 2010-01-11 10:15:56.000000000 -0800
@@ -91,7 +91,7 @@
sort_merged_arrays = options[:sort_merged_arrays] || false
di = options[:debug_indent] || ''
# do nothing if source is nil
- if !source || (source.respond_to?(:blank?) && source.blank?) : return dest; end
+ if source.nil? || (source.respond_to?(:blank?) && source.blank?) : return dest; end
# if dest doesn't exist, then simply copy source to it
if !(dest) && overwrite_unmergeable : dest = source; return dest; end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment