2015/10/09分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Follow DRY principle and remove duplication
actionview/lib/action_view/routing_url_for.rb
の修正です。
url_for
メソッドで、引数のoptions
がHash
とActionController::Parametes
の場合とで、処理が重複していたので、重複していた処理をメソッドに切り出しています。
Avoid leaking the first relation we call #first on
activesupport/lib/active_support/per_thread_registry.rb
の修正です。
Relation#first
で取得したオブジェクトがGCの対象にならないバグがあったのを修正しています。
- define_singleton_method(name) do |*a, &b| - instance.public_send(name, *a, &b) - end + # + # By letting #delegate handle it, we avoid an enclosure that'll capture args. + singleton_class.delegate name, to: :instance
define_singleton_method
メソッドのブロック内で値を設定してしまっていた為、enclosure内に値がキャプチャされてしまった為、GC対象にならなかった、という事のような…。多分…。
Merge pull request #21912 from y-yagi/move_prepare_destination_to_public
railties/lib/rails/generators/testing/behaviour.rb
のdocの修正です。
prepare_destination
メソッドを、privte APIからpublic APIに変更しています。
prepare_destination
メソッドはgeneratorsのデフォルトのテンプレートファイルで使用されており、API docで見れる状態が正しいと思った為。