提交 02b0f8d9 编写于 作者: A Ayrton De Craene

to_formatted_s is an instance method for a Range not an Array

上级 96aa3bd0
......@@ -7,7 +7,7 @@ class Range
#
# ==== Example
#
# [1..100].to_formatted_s # => "1..100"
# (1..100).to_formatted_s # => "1..100"
def to_formatted_s(format = :default)
if formatter = RANGE_FORMATS[format]
formatter.call(first, last)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册