2014/10/25分のコミットです。
CHANGELOGへの追加はありませんでした。
Improved try documentation [ci skip]
activesupport/lib/active_support/core_ext/object/try.rb
のdocの修正です。
try
メソッドのexampleの追加、タイポ、グラマーの修正等を行っています。
Include return value in examples added in #17378 [ci skip]
activesupport/lib/active_support/core_ext/object/try.rb
のdocの修正です。
先のコミットで追加したexampleについて、実行結果を追加しています。
Revert a change made to the example in 1ac4525
activesupport/lib/active_support/core_ext/object/try.rb
のdocの修正です。
先のコミットで追加したexampleで、戻り値がnilだった場合の考慮が足りてなかったモノがあったので、再度修正しています。
Fix typo in "Active Record Basics" guide. [ci skip]
guides/source/active_record_basics.md
の修正です。
タイポ(is -> an)の修正を行っています。
Avoid creating unneeded Hash instance and calling slow Hash#fetch
actionview/lib/action_view/renderer/template_renderer.rb
の修正です。
determine_template
メソッドで、引数のチェック処理で不要なHashのインスタンを生成するケースがあったので、それを避ける対応、及びHash#fetch
を使用しないよう改善しています。
guides/source/active_support_core_extensions.md
の修正です。
full_messages
メソッドのexampleが現在のコードとずれていたようで、最新の内容に更新しています。
Avoid creating range objects (take II)
activesupport/lib/active_support/core_ext/array/access.rb
の修正です。
to
メソッドで、不要なRange Obejectを作成しないようリファクタリングしています。
actionview/lib/action_view/template.rb
の修正です。
locals_code
メソッドで、インスタンス生成処理を減らすようリファクタリングしています。
map
..join
メソッドを使用していたのを、each_with_object
を使用するよう修正しています。
actionview/lib/action_view/template.rb
の修正です。
method_name
メソッドで、インスタンス生成処理を減らすようリファクタリングしています。
- @method_name ||= "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}".tr('-', "_") + @method_name ||= begin + m = "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}" + m.tr!('-', '_') + m + end
むう。これで改善になるんですねえ。
activesupport/lib/active_support/core_ext/string/output_safety.rb
の修正です。
instance_eval
ではなく、instance_variable_set
を使用するよう修正しています。
fixes circularity check in dependencies
activesupport/lib/active_support/dependencies.rb
の修正です。
load_missing_constant
メソッドで、循環読み込みのチェック処理を修正しています。
既に読み込み済みのファイルではなく、今読み込んでいるファイルに対してチェックを行うように修正した、なのかなあ…。
give a better error message for misspelled helpers
actionpack/lib/abstract_controller/helpers.rb
の修正です。
helperのロードに失敗した場合に、適切なエラーメッセージを表示されるよう修正しています。