We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed72cd6 commit ba74c8bCopy full SHA for ba74c8b
lib/t/rcfile.rb
@@ -17,11 +17,8 @@ def [](username)
17
18
def find(username)
19
possibilities = Array(find_case_insensitive_match(username) || find_case_insensitive_possibilities(username))
20
- if possibilities.size == 1
21
- possibilities.first
22
- else
23
- raise(ArgumentError.new("Username #{username} is #{possibilities.empty? ? 'not found.' : 'ambiguous, matching ' + possibilities.join(', ')}"))
24
- end
+ raise(ArgumentError.new("Username #{username} is #{possibilities.empty? ? 'not found.' : 'ambiguous, matching ' + possibilities.join(', ')}")) unless possibilities.size == 1
+ possibilities.first
25
end
26
27
def find_case_insensitive_match(username)
0 commit comments