Skip to content

Commit

Permalink
rubocop style fix: shorthand += and chained blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
reaperhulk committed Apr 17, 2014
1 parent bd70628 commit 3406581
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/r509/cert/extensions/key_usage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def parse_extension
# the second byte is not encoded. let's add it back so we can
# have the full bitmask for comparison
if data.size == 1
data = data + "\0"
data += "\0"
end
bit_mask = data.unpack('n')[0] # treat it as a 16-bit unsigned big endian
# KeyUsage ::= BIT STRING {
Expand Down
3 changes: 1 addition & 2 deletions lib/r509/config/subject_item_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ def validate_required_match(subject)
# those that are on the required list
supplied = subject.to_a.each do |item|
@required.include?(item[0]) or @match.include?(item[0])
end.map do |item|
item[0]
end
supplied = supplied.map { |item| item[0] }
# so we can make sure they gave us everything that's required
diff = @required + @match - supplied
unless diff.empty?
Expand Down

0 comments on commit 3406581

Please sign in to comment.