aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/software_spec.rb
diff options
context:
space:
mode:
authorJack Nagel2014-08-07 00:48:13 -0500
committerJack Nagel2014-08-07 00:48:13 -0500
commitbfda0a841278b288166362172bdecc6acfa740cd (patch)
tree2142e8c3836a8083360114079d1efb1e3b3fdc1b /Library/Homebrew/software_spec.rb
parent565944c6fe4c70dd8666a205c8a7b6cc610305fc (diff)
downloadhomebrew-bfda0a841278b288166362172bdecc6acfa740cd.tar.bz2
Raise ArgumentError for argument errors
Diffstat (limited to 'Library/Homebrew/software_spec.rb')
-rw-r--r--Library/Homebrew/software_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index 88370e0fa..fe0277adb 100644
--- a/Library/Homebrew/software_spec.rb
+++ b/Library/Homebrew/software_spec.rb
@@ -78,8 +78,8 @@ class SoftwareSpec
def option name, description=nil
name = 'c++11' if name == :cxx11
name = name.to_s if Symbol === name
- raise "Option name is required." if name.empty?
- raise "Options should not start with dashes." if name[0, 1] == "-"
+ raise ArgumentError, "option name is required" if name.empty?
+ raise ArgumentError, "options should not start with dashes" if name.start_with?("-")
build.add(name, description)
end