提交 b89a3e7e 编写于 作者: R Ryuta Kamizono

Tweaks CHANGELOGs and docs [ci skip]

* add leading `#` before `=>` since hash rocket is valid Ruby code
* add backticks
* remove trailing spaces
* and more
上级 2bf55179
......@@ -11,6 +11,7 @@
*Pratik Naik*
## Rails 6.0.0.beta1 (January 18, 2019) ##
* Added to Rails.
......
......@@ -14,18 +14,19 @@
## Rails 6.0.0.beta2 (February 25, 2019) ##
* ActionView::Template.finalize_compiled_template_methods is deprecated with
* `ActionView::Template.finalize_compiled_template_methods` is deprecated with
no replacement.
*tenderlove*
* config.action_view.finalize_compiled_template_methods is deprecated with
* `config.action_view.finalize_compiled_template_methods` is deprecated with
no replacement.
*tenderlove*
* Ensure unique DOM IDs for collection inputs with float values.
Fixes #34974
Fixes #34974.
*Mark Edmondson*
......
......@@ -41,12 +41,12 @@
Before:
Day.new({"day(1i)"=>"1", "day(2i)"=>"1", "day(3i)"=>"1"})
=> #<Day id: nil, day: "0001-01-03", created_at: nil, updated_at: nil>
# => #<Day id: nil, day: "0001-01-03", created_at: nil, updated_at: nil>
After:
Day.new({"day(1i)"=>"1", "day(2i)"=>"1", "day(3i)"=>"1"})
=> #<Day id: nil, day: "0001-01-01", created_at: nil, updated_at: nil>
# => #<Day id: nil, day: "0001-01-01", created_at: nil, updated_at: nil>
Fixes #28521.
......
......@@ -11,15 +11,15 @@
Before:
(1..10).cover?(1...11) => false
(1..10).cover?(1...11) # => false
After:
(1..10).cover?(1...11) => true
(1..10).cover?(1...11) # => true
With the same change for `Range#include?` and `Range#===`.
*Owen Stephens*
*Owen Stephens*
* Use weak references in descendants tracker to allow anonymous subclasses to
be garbage collected.
......@@ -36,11 +36,11 @@
* Fix `Time#advance` to work with dates before 1001-03-07
Before:
Time.utc(1001, 3, 6).advance(years: -1) # => 1000-03-05 00:00:00 UTC
After
Time.utc(1001, 3, 6).advance(years: -1) # => 1000-03-06 00:00:00 UTC
Note that this doesn't affect `DateTime#advance` as that doesn't use a proleptic calendar.
......@@ -55,27 +55,27 @@
I18n.backend.store_translations(:de, i18n: { transliterate: { rule: { "ü" => "ue" } } })
ActiveSupport::Inflector.transliterate("ü", locale: :de) => "ue"
"Fünf autos".parameterize(locale: :de) => "fuenf-autos"
ActiveSupport::Inflector.parameterize("Fünf autos", locale: :de) => "fuenf-autos"
ActiveSupport::Inflector.transliterate("ü", locale: :de) # => "ue"
"Fünf autos".parameterize(locale: :de) # => "fuenf-autos"
ActiveSupport::Inflector.parameterize("Fünf autos", locale: :de) # => "fuenf-autos"
*Kaan Ozkan*, *Sharang Dashputre*
* Allow Array#excluding and Enumerable#excluding to deal with a passed array gracefully.
[ 1, 2, 3, 4, 5 ].excluding([4, 5]) => [ 1, 2, 3 ]
[ 1, 2, 3, 4, 5 ].excluding([4, 5]) # => [ 1, 2, 3 ]
*DHH*
* Renamed Array#without and Enumerable#without to Array#excluding and Enumerable#excluding, to create parity with
Array#including and Enumerable#including. Retained the old names as aliases.
* Renamed `Array#without` and `Enumerable#without` to `Array#excluding` and `Enumerable#excluding`, to create parity with
`Array#including` and `Enumerable#including`. Retained the old names as aliases.
*DHH*
* Added Array#including and Enumerable#including to conveniently enlarge a collection with more members using a method rather than an operator:
* Added `Array#including` and `Enumerable#including` to conveniently enlarge a collection with more members using a method rather than an operator:
[ 1, 2, 3 ].including(4, 5) => [ 1, 2, 3, 4, 5 ]
post.authors.including(Current.person) => All the authors plus the current person!
[ 1, 2, 3 ].including(4, 5) # => [ 1, 2, 3, 4, 5 ]
post.authors.including(Current.person) # => All the authors plus the current person!
*DHH*
......
......@@ -31,16 +31,16 @@ def to(position)
# Returns a new array that includes the passed elements.
#
# [ 1, 2, 3 ].including(4, 5) => [ 1, 2, 3, 4, 5 ]
# [ [ 0, 1 ] ].including([ [ 1, 0 ] ]) => [ [ 0, 1 ], [ 1, 0 ] ]
# [ 1, 2, 3 ].including(4, 5) # => [ 1, 2, 3, 4, 5 ]
# [ [ 0, 1 ] ].including([ [ 1, 0 ] ]) # => [ [ 0, 1 ], [ 1, 0 ] ]
def including(*elements)
self + elements.flatten(1)
end
# Returns a copy of the Array excluding the specified elements.
#
# ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") => ["David", "Rafael"]
# [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) => [ [ 0, 1 ] ]
# ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"]
# [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ]
#
# Note: This is an optimization of <tt>Enumerable#excluding</tt> that uses <tt>Array#-</tt>
# instead of <tt>Array#reject</tt> for performance reasons.
......
......@@ -6,7 +6,7 @@
* Add `config.disable_sandbox` option to Rails console.
This setting will disable `rails console --sandbox` mode, preventing
developer from accidentally starting a sandbox console,
developer from accidentally starting a sandbox console,
which when left inactive, can cause the database server to run out of memory.
*Prem Sichanugrist*
......@@ -15,6 +15,7 @@
*Yuji Yaginuma*
## Rails 6.0.0.beta3 (March 11, 2019) ##
* Generate random development secrets
......@@ -29,7 +30,6 @@
*Eileen M. Uchitelle*, *Aaron Patterson*, *John Hawthorn*
## Rails 6.0.0.beta2 (February 25, 2019) ##
* Fix non-symbol access to nested hashes returned from `Rails::Application.config_for`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册