なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2016/03/16)

2016/03/16分のコミットです。

CHANGELOGへの追加はありませんでした。


adds coverage for throwing while autoloading

activesupport/test/dependencies_test.rbの修正です。

autoloading処理中にthrowが呼ばれた場合のテストを追加しています。


adds coverage for raising while autoloading

activesupport/test/dependencies_test.rbの修正です。

autoloading処理中にExceptionがraiseされた場合のテストを追加しています。


s/removes/discards/

activesupport/test/dependencies_test.rbの修正です。

autoloading処理中にException / throwが発生した場合の挙動を確認するテストのテスト名が、test_raising_removes_autoloaded_constantstest_throwing_removes_autoloaded_constantsになっていたのを、それぞれtest_raising_discards_autoloaded_constantstest_throwing_discards_autoloaded_constantsに修正しています。


tests the raising/throwing discards the watching stack

activesupport/test/dependencies_test.rbの修正です。

autoloading処理中にException / throwが発生した場合の挙動を確認するテストで、エラーが発生する前に定義された定数も破棄される事を確認するテストを追加しています。


removes unreachable code

activesupport/lib/active_support/dependencies.rbの修正です。

new_constants_inメソッドから、実行される事が無い空配列を返す処理を削除しています。


no need to clear an unusued collection

activesupport/lib/active_support/dependencies.rbの修正です。

new_constants_inメソッドで、エラーが発生した場合に、定義された定数の破棄及びその定数を管理しているcollectionのクリア処理をしていたのですが、collectionのクリア処理は不要(内部構造がクリアされる訳ではないので、意味が無かった)との事で、削除しています。


Add comments to ActiveSupport::Dependencies to help understanding

activesupport/lib/active_support/dependencies.rbのdocの修正です。

remove_constantメソッド内に、処理の説明用のコメントを追加しています。


Improve code readability in ActiveSupport::Dependencies

activesupport/lib/active_support/dependencies.rbの修正です。

new_constants_inメソッドで、処理中にエラーが起きたかどうかの判定を行う為の変数名がabortingになっていたのをsuccessに修正、及び、コメントの改善を行っています。


adds .gitattributes to enable Ruby-awareness

.gitattributesファイルを追加しています。内容は下記の通りです。

.rb diff=ruby
*.gemspec diff=ruby

中身はRuby本体(ruby/.gitattributes at trunk · ruby/ruby)を参考にした、との事です。


fix a comment in atom_feed_helper.rb

actionview/lib/action_view/helpers/atom_feed_helper.rbのdocの修正です。

a xhtmlan xhtmlに修正しています。