Skip to content

Commit

Permalink
verify_local_codepoints checks if arg is a Hash
Browse files Browse the repository at this point in the history
  • Loading branch information
unpatioli committed Nov 22, 2011
1 parent 9461efa commit b625b1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stringex/unidecoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down

0 comments on commit b625b1d

Please sign in to comment.