Skip to content

Commit ab32a1a

Browse files
committed
RuboCop
1 parent 2bb66b1 commit ab32a1a

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ Lint/DuplicateElsifCondition:
9999
Lint/OutOfRangeRegexpRef:
100100
Enabled: false
101101

102+
Lint/InheritException:
103+
Enabled: false
104+
102105
Lint/ElseLayout:
103106
Exclude:
104107
- 'language/if_spec.rb'

.rubocop_todo.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@ Lint/IneffectiveAccessModifier:
5050
- 'core/module/fixtures/classes.rb'
5151
- 'language/fixtures/private.rb'
5252

53-
# Offense count: 6
54-
# Cop supports --auto-correct.
55-
# Configuration parameters: EnforcedStyle.
56-
# SupportedStyles: runtime_error, standard_error
57-
Lint/InheritException:
58-
Exclude:
59-
- 'core/enumerator/lazy/fixtures/classes.rb'
60-
- 'core/exception/fixtures/common.rb'
61-
- 'core/module/fixtures/autoload_ex1.rb'
62-
- 'shared/kernel/raise.rb'
63-
6453
# Offense count: 72
6554
# Cop supports --auto-correct.
6655
Lint/LiteralInInterpolation:

core/io/shared/readlines.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,4 +256,4 @@
256256
end
257257
end
258258
end
259-
end
259+
end

library/openssl/x509/name/verify_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
cert.public_key = key.public_key
1313
cert.not_before = Time.now
1414
cert.not_after = cert.not_before + 365 * 24 * 60 * 60
15-
cert.sign key, OpenSSL::Digest::SHA1.new
15+
cert.sign key, OpenSSL::Digest.new('SHA1')
1616
store = OpenSSL::X509::Store.new
1717
store.add_cert(cert)
1818
store.verify(cert).should == true
@@ -28,7 +28,7 @@
2828
cert.public_key = key.public_key
2929
cert.not_before = Time.now - 10
3030
cert.not_after = Time.now - 5
31-
cert.sign key, OpenSSL::Digest::SHA1.new
31+
cert.sign key, OpenSSL::Digest.new('SHA1')
3232
store = OpenSSL::X509::Store.new
3333
store.add_cert(cert)
3434
store.verify(cert).should == false
@@ -51,7 +51,7 @@
5151
root_cert.add_extension(ef.create_extension("keyUsage","keyCertSign, cRLSign", true))
5252
root_cert.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false))
5353
root_cert.add_extension(ef.create_extension("authorityKeyIdentifier","keyid:always",false))
54-
root_cert.sign(root_key, OpenSSL::Digest::SHA256.new)
54+
root_cert.sign(root_key, OpenSSL::Digest.new('SHA256'))
5555

5656

5757
key = OpenSSL::PKey::RSA.new 2048
@@ -68,11 +68,11 @@
6868
ef.issuer_certificate = root_cert
6969
cert.add_extension(ef.create_extension("keyUsage","digitalSignature", true))
7070
cert.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false))
71-
cert.sign(root_key, OpenSSL::Digest::SHA256.new)
71+
cert.sign(root_key, OpenSSL::Digest.new('SHA256'))
7272

7373
store = OpenSSL::X509::Store.new
7474
store.add_cert(root_cert)
7575
store.add_cert(cert)
7676
store.verify(cert).should == false
7777
end
78-
end
78+
end

library/stringio/shared/each.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,4 @@
160160
@io.send(@method, 4) { |s| seen << s }
161161
seen.should == ["a b ", "c d ", "e\n", "1 2 ", "3 4 ", "5"]
162162
end
163-
end
163+
end

0 commit comments

Comments
 (0)