diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-07-13 12:01:07 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-07-31 21:07:19 +0900 |
commit | a89665b7b1abb5bb6005fd638dc920848cc50f72 (patch) | |
tree | f6c84f1bfb1148d203cd63c72c458de3a8f5e961 /lib/rubygems/package | |
parent | a6bfc951aa9c48e2a4608a9ae84e2e3b4fd9b390 (diff) | |
download | ruby-a89665b7b1abb5bb6005fd638dc920848cc50f72.tar.gz |
Enforce no empty lines around class body in rubygems
To normalize the code style with `bundler`.
Diffstat (limited to 'lib/rubygems/package')
-rw-r--r-- | lib/rubygems/package/digest_io.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/file_source.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/io_source.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/old.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/tar_header.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/tar_reader.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/tar_reader/entry.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/tar_test_case.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/tar_writer.rb | 6 |
9 files changed, 0 insertions, 22 deletions
diff --git a/lib/rubygems/package/digest_io.rb b/lib/rubygems/package/digest_io.rb index d9e6c3c021..4736f76d93 100644 --- a/lib/rubygems/package/digest_io.rb +++ b/lib/rubygems/package/digest_io.rb @@ -3,7 +3,6 @@ # IO wrapper that creates digests of contents written to the IO it wraps. class Gem::Package::DigestIO - ## # Collected digests for wrapped writes. # @@ -60,5 +59,4 @@ class Gem::Package::DigestIO result end - end diff --git a/lib/rubygems/package/file_source.rb b/lib/rubygems/package/file_source.rb index 8a4f9da6f2..114a950c77 100644 --- a/lib/rubygems/package/file_source.rb +++ b/lib/rubygems/package/file_source.rb @@ -7,7 +7,6 @@ # object to `Gem::Package.new`. class Gem::Package::FileSource < Gem::Package::Source # :nodoc: all - attr_reader :path def initialize(path) @@ -29,5 +28,4 @@ class Gem::Package::FileSource < Gem::Package::Source # :nodoc: all def with_read_io(&block) File.open path, 'rb', &block end - end diff --git a/lib/rubygems/package/io_source.rb b/lib/rubygems/package/io_source.rb index 669a859d0a..7d7383110b 100644 --- a/lib/rubygems/package/io_source.rb +++ b/lib/rubygems/package/io_source.rb @@ -8,7 +8,6 @@ # object to `Gem::Package.new`. class Gem::Package::IOSource < Gem::Package::Source # :nodoc: all - attr_reader :io def initialize(io) @@ -41,5 +40,4 @@ class Gem::Package::IOSource < Gem::Package::Source # :nodoc: all def path end - end diff --git a/lib/rubygems/package/old.rb b/lib/rubygems/package/old.rb index aeb6c999c0..25317ef23f 100644 --- a/lib/rubygems/package/old.rb +++ b/lib/rubygems/package/old.rb @@ -12,7 +12,6 @@ # Please pretend this doesn't exist. class Gem::Package::Old < Gem::Package - undef_method :spec= ## @@ -166,5 +165,4 @@ class Gem::Package::Old < Gem::Package true end - end diff --git a/lib/rubygems/package/tar_header.rb b/lib/rubygems/package/tar_header.rb index 19927c0e27..f19aea549d 100644 --- a/lib/rubygems/package/tar_header.rb +++ b/lib/rubygems/package/tar_header.rb @@ -28,7 +28,6 @@ # A header for a tar file class Gem::Package::TarHeader - ## # Fields in the tar header @@ -241,5 +240,4 @@ class Gem::Package::TarHeader def oct(num, len) "%0#{len}o" % num end - end diff --git a/lib/rubygems/package/tar_reader.rb b/lib/rubygems/package/tar_reader.rb index b7b5e01e99..e7c5620533 100644 --- a/lib/rubygems/package/tar_reader.rb +++ b/lib/rubygems/package/tar_reader.rb @@ -8,7 +8,6 @@ # TarReader reads tar files and allows iteration over their items class Gem::Package::TarReader - include Enumerable ## @@ -120,7 +119,6 @@ class Gem::Package::TarReader ensure rewind end - end require 'rubygems/package/tar_reader/entry' diff --git a/lib/rubygems/package/tar_reader/entry.rb b/lib/rubygems/package/tar_reader/entry.rb index d9c67ed8f2..5865599d3a 100644 --- a/lib/rubygems/package/tar_reader/entry.rb +++ b/lib/rubygems/package/tar_reader/entry.rb @@ -8,7 +8,6 @@ # Class for reading entries out of a tar file class Gem::Package::TarReader::Entry - ## # Header for this tar entry @@ -165,5 +164,4 @@ class Gem::Package::TarReader::Entry @io.pos = @orig_pos @read = 0 end - end diff --git a/lib/rubygems/package/tar_test_case.rb b/lib/rubygems/package/tar_test_case.rb index e4c408e416..5fc34d2e8c 100644 --- a/lib/rubygems/package/tar_test_case.rb +++ b/lib/rubygems/package/tar_test_case.rb @@ -6,7 +6,6 @@ require 'rubygems/package' # A test case for Gem::Package::Tar* classes class Gem::Package::TarTestCase < Gem::TestCase - def ASCIIZ(str, length) str + "\0" * (length - str.length) end @@ -137,5 +136,4 @@ class Gem::Package::TarTestCase < Gem::TestCase def util_symlink_entry util_entry tar_symlink_header("foo", "bar", 0, Time.now, "link") end - end diff --git a/lib/rubygems/package/tar_writer.rb b/lib/rubygems/package/tar_writer.rb index 5289e6f1e6..87c7dc6076 100644 --- a/lib/rubygems/package/tar_writer.rb +++ b/lib/rubygems/package/tar_writer.rb @@ -10,14 +10,12 @@ require 'digest' # Allows writing of tar files class Gem::Package::TarWriter - class FileOverflow < StandardError; end ## # IO wrapper that allows writing a limited amount of data class BoundedStream - ## # Maximum number of bytes that can be written @@ -49,14 +47,12 @@ class Gem::Package::TarWriter @written += data.bytesize data.bytesize end - end ## # IO wrapper that provides only #write class RestrictedStream - ## # Creates a new RestrictedStream wrapping +io+ @@ -70,7 +66,6 @@ class Gem::Package::TarWriter def write(data) @io.write data end - end ## @@ -333,5 +328,4 @@ class Gem::Package::TarWriter return name, prefix end - end |