2015/01/19分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Include stackprof on ruby 2.2 as well as 2.1
Gemfile
の修正です。
Ruby 2.2でもstackprof
を使用するよう修正しています。
.travis.yml
の修正です。
Travisでテストを実行する際、最新のbundlerを使用するようbefore_scriptでgem install bundler
を実行するよう修正しています。
Don't calculate in-place changes on attribute assignment
activemodel/lib/active_model/dirty.rb
、
activerecord/lib/active_record/attribute_methods/dirty.rb
の修正です。
save_changed_attribute
メソッド内でのattributeが変更されたかどうかのチェックにattribute_changed?
ではなく、attribute_changed_by_setter?
を使用するよう修正しています。
attribute_changed?
の延長で適切な箇所での変更をチェックする処理が行われていたのですが、これは重い処理、かつ、attributeに直接値を設定した場合は不要、との事で行わないよう修正したようです。
Should escape regexp wildcard character .
ActiveRecordのテストの修正です。
assert_match
でテストを行ってる箇所で、正規表現を使用する際、"."をエスケープせずに使用している箇所があったのを、"\"でエスケープするよう修正しています。
エスケープ無しだとwildcardになってしまって、一文字なら何でもマッチしてしまうからですね。
activerecord/test/cases/migration/column_positioning_test.rb
の修正です。
使用していないtable_name
accessorを削除しています。
Merge pull request #18501 from prathamesh-sonpatki/nosql
activerecord/lib/active_record/persistence.rb
の修正です。
update_attribute
を、値の変更があった場合のみクエリーを発行するよう修正しています。値が変わってない場合に、不要なクエリーを発行しないようにする為、との事です。
Fix name_for_action in routing
actionpack/lib/action_dispatch/routing/mapper.rb
の修正です。
resource
オプションのas
オプションに空文字を指定した場合に、rake routesの実行結果に不要な"_"が付与されてしまっていたのを修正しています。
Rails.application.routes.draw do resource :user, as: '' end
$ rake routes # 4.2 new_ GET /user/new(.:format) users#new edit_ GET /user/edit(.:format) users#edit # 4.1.9 new GET /user/new(.:format) users#new edit GET
present?
のチェックを追加して対応しています。
Merge pull request #18380 from nobu/Use-EXEEXT
railties/lib/rails/commands/dbconsole.rb
の修正です。
RbConfig::CONFIG['host_os']
がWindows(mswin|mingw)の場合にコマンド名に".exe"を追加していたのを、RbConfig::CONFIG['EXEEXT']
を使用するよう修正しています。
- commands += commands.map{|cmd| "#{cmd}.exe"} if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ + unless (ext = RbConfig::CONFIG['EXEEXT']).empty? + commands = commands.map{|cmd| "#{cmd}#{ext}"} + end
Fix wording in AR CHANGELOG about time columns change [ci skip]
activerecord/CHANGELOG.md
の修正です。
time columnsに関する対応について、グラマーの修正を行っています。
Use force: true options for creating tables in bug templates
guides/bug_report_templates/active_record_gem.rb
、
guides/bug_report_templates/active_record_master.rb
の修正です。
バグ報告用テンプレートで、tableを作成する際にforce: true
するよう修正しています。同じテーブルがあった時の為に、なんですが、in memoryのdatabaseなので、同じテーブルがある、というケースは無さそうな気もするのですが…。
fix typo in number_field_tag documentation [ci skip]
actionview/lib/action_view/helpers/form_tag_helper.rb
のdocの修正です。
number_field_tag
メソッドexampleの実行結果にタイポがあったのを修正しています。
Merge pull request #18450 from tonytonyjan/patch-1
activesupport/lib/active_support/core_ext/numeric/time.rb
の修正です。
active_support/core_ext/date/acts_like
のrequireを追加しています。