diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-13 01:18:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-13 01:18:33 +0000 |
commit | 2c091f564cf0df3b1217a1a32aabe2364402cc6f (patch) | |
tree | 211777510c3808421b1464435adaa274e684024d /lib | |
parent | 5c0e6cc886abb26ab02c40de5ad217595f6e9b82 (diff) | |
download | ruby-2c091f564cf0df3b1217a1a32aabe2364402cc6f.tar.gz |
optparse.rb: Remove redundant `.freeze`
[Fix GH-1873]
From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/optparse.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index 31d18aee35..955f9db778 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -436,7 +436,7 @@ class OptionParser candidates = [] block.call do |k, *v| (if Regexp === k - kn = "".freeze + kn = "" k === key else kn = defined?(k.id2name) ? k.id2name : k @@ -1976,7 +1976,7 @@ XXX # class ParseError < RuntimeError # Reason which caused the error. - Reason = 'parse error'.freeze + Reason = 'parse error' def initialize(*args) @args = args @@ -2039,42 +2039,42 @@ XXX # Raises when ambiguously completable string is encountered. # class AmbiguousOption < ParseError - const_set(:Reason, 'ambiguous option'.freeze) + const_set(:Reason, 'ambiguous option') end # # Raises when there is an argument for a switch which takes no argument. # class NeedlessArgument < ParseError - const_set(:Reason, 'needless argument'.freeze) + const_set(:Reason, 'needless argument') end # # Raises when a switch with mandatory argument has no argument. # class MissingArgument < ParseError - const_set(:Reason, 'missing argument'.freeze) + const_set(:Reason, 'missing argument') end # # Raises when switch is undefined. # class InvalidOption < ParseError - const_set(:Reason, 'invalid option'.freeze) + const_set(:Reason, 'invalid option') end # # Raises when the given argument does not match required format. # class InvalidArgument < ParseError - const_set(:Reason, 'invalid argument'.freeze) + const_set(:Reason, 'invalid argument') end # # Raises when the given argument word can't be completed uniquely. # class AmbiguousArgument < InvalidArgument - const_set(:Reason, 'ambiguous argument'.freeze) + const_set(:Reason, 'ambiguous argument') end # |