2016/07/27分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Quoting booleans should return a frozen string
activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
、
activerecord/lib/active_record/connection_adapters/mysql/quoting.rb
の修正。
quoting booleansをfreezeするよう修正しています。
def quoted_true - "'t'" + "'t'".freeze end
freezeしておかないと、quote
した値を上書き出来てしまう為、それを避ける為にとの事です。
irb(main):001:0> ActiveRecord::Base.connection.quote(true) << ' foo' => "1 foo" irb(main):002:0> ActiveRecord::Base.connection.quote(true) << ' foo' => "1 foo foo"
Merge pull request #25912 from stevenharman/fix_render_partial_collection_to_allow_custom_collection
actionview/lib/action_view/renderer/partial_renderer.rb
の修正です。
collectionをpartial renderingする際に、collectionのto_ary
メソッドを使用していたのを、to_a
メソッドを使用するよう修正しています。
def collection_from_options if @options.key?(:collection) collection = @options[:collection] - collection.respond_to?(:to_ary) ? collection.to_ary : [] + collection ? collection.to_a : [] end end
Enumerator
やEnumerable
のインスタンスにはto_ary
メソッドが定義されておらず、collectionに左記のクラスを指定した場合に、partial renderingが行えないという問題があった為修正したとの事です。
A generated app should not include Uglifier with --skip-javascript
option.
railties/lib/rails/generators/app_base.rb
、
railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
の修正です。
rails new
に--skip-javascript
オプションを指定した場合、Gemfileにuglifier
を含まないよう修正しています。
Return ActionDispatch.test_app when no app is set on IntegrationTest.app method
actionpack/lib/action_dispatch/testing/integration.rb
の修正です。
IntegrationTest.test_app
メソッドで、@@app
がnilの場合に、ActionDispatch.test_app
を返すよう修正しています。が、後ほど再度修正が行われています。
Be more explicit with the expected result
actionpack/test/controller/integration_test.rb
の修正です。
ActionDispatch::Integration.app
メソッドのテストで、期待する値をより明確な値に修正しています。
- assert_equal ActionDispatch.test_app, self.class.app + assert_equal 'fake_app', self.class.app
There are some cases where @@app is not defined
actionpack/lib/action_dispatch/testing/integration.rb
の修正です。
IntegrationTest.test_app
メソッドで、@@app
を返す条件を、@@app
が定義済み、かつ、nilで無い場合に修正しています。
def app - @@app || ActionDispatch.test_app + if defined?(@@app) && @@app + @@app + else + ActionDispatch.test_app + end
@@app
がそもそも定義されてないケースは色々とある為、との事です。
Merge pull request #25958 from kamipo/should_be_target_loaded
activerecord/test/cases/associations/has_many_associations_test.rb
の修正です。
has_many
associationに関する各テストで、対象のassociationがload済みである事を確認するassertionを追加しています。