[ruby/zh-cn] fix typo (#4681)

This commit is contained in:
kdxcxs 2023-06-08 14:56:07 +08:00 committed by GitHub
parent c6f6dac5f8
commit b3a8f56424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -430,7 +430,7 @@ def guests(*array)
array.each { |guest| puts guest }
end
#
#
# 如果函数返回一个数组,在赋值时可以进行拆分:
def foods
@ -449,7 +449,7 @@ end
best *ranked_competitors.first(3) #=> Winners are John, Sally, and Dingus.
# 构操作符也可放在参数里面
# 构操作符也可放在参数里面
def best(first, second, third, *others)
puts "Winners are #{first}, #{second}, and #{third}."
puts "There were #{others.count} other participants."