Fix type errors
This commit is contained in:
parent
e68b02c4a6
commit
d8ba8c807a
@ -32,11 +32,12 @@ class Array
|
||||
when 0
|
||||
+""
|
||||
when 1
|
||||
+(self[0]).to_s
|
||||
# This is not typesafe, if the array contains a BasicObject
|
||||
+T.unsafe(self[0]).to_s
|
||||
when 2
|
||||
+"#{self[0]}#{two_words_connector}#{self[1]}"
|
||||
else
|
||||
+"#{self[0...-1].join(words_connector)}#{last_word_connector}#{self[-1]}"
|
||||
+"#{T.must(self[0...-1]).join(words_connector)}#{last_word_connector}#{self[-1]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user