Permalink
Browse files

verify_local_codepoints checks if arg is a Hash

  • Loading branch information...
1 parent 9461efa commit b625b1d1efb1fc2b425b2ce113a33b94d36b465f @unpatioli unpatioli committed Nov 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/stringex/unidecoder.rb
@@ -115,7 +115,7 @@ def grouped_point(unpacked_character)
# Checks LOCAL_CODEPOINTS's Hash is in the format we expect before assigning it and raises
# instructive exception if not
def verify_local_codepoints(hash)
- pass_check = hash.all?{|key, value|
+ pass_check = hash.is_a?(Hash) && hash.all?{|key, value|
# Fuck a duck, eh?
[Symbol, String].include?(key.class) && value.is_a?(Hash) &&
value.keys.all?{|k| k.is_a?(String)} && value.values.all?{|v| v.is_a?(String)}

0 comments on commit b625b1d

Please sign in to comment.