diff options
Diffstat (limited to 'app/models/packages/go/module_version.rb')
-rw-r--r-- | app/models/packages/go/module_version.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/packages/go/module_version.rb b/app/models/packages/go/module_version.rb index fd575e6c96c..c442b2416f1 100644 --- a/app/models/packages/go/module_version.rb +++ b/app/models/packages/go/module_version.rb @@ -17,15 +17,15 @@ module Packages delegate :build, to: :@semver, allow_nil: true def initialize(mod, type, commit, name: nil, semver: nil, ref: nil) - raise ArgumentError.new("invalid type '#{type}'") unless VALID_TYPES.include? type - raise ArgumentError.new("mod is required") unless mod - raise ArgumentError.new("commit is required") unless commit + raise ArgumentError, "invalid type '#{type}'" unless VALID_TYPES.include? type + raise ArgumentError, "mod is required" unless mod + raise ArgumentError, "commit is required" unless commit if type == :ref - raise ArgumentError.new("ref is required") unless ref + raise ArgumentError, "ref is required" unless ref elsif type == :pseudo - raise ArgumentError.new("name is required") unless name - raise ArgumentError.new("semver is required") unless semver + raise ArgumentError, "name is required" unless name + raise ArgumentError, "semver is required" unless semver end @mod = mod |