Skip to content

Commit 69858e1

Browse files
Earlopainhainesr
authored andcommitted
Eagerly require gem version
v3 is released and contains breaking changes. I was a bit surprised that I had to manually require this file. Can't be helped now of course but it will help with future major versions. Nodoc on it also seems wrong. To support both v2 and v3, I have to know which version I'm using.
1 parent 9d67a3e commit 69858e1

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

lib/zip.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
require 'fileutils'
88
require 'stringio'
99
require 'zlib'
10+
require 'zip/version'
1011
require 'zip/constants'
1112
require 'zip/dos_time'
1213
require 'zip/ioextras'

lib/zip/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Zip
4-
VERSION = '3.0.0' # :nodoc:
4+
VERSION = '3.0.0'
55
end

test/version_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
require 'test_helper'
4-
require 'zip/version'
54

65
class VersionTest < MiniTest::Test
76
def test_version

0 commit comments

Comments
 (0)