mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
to_formatted_s is an instance method for a Range not an Array
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user