2018/07/15分のコミットです。
CHANGELOGへの追加はありませんでした。
Ensure attribute is a symbol in the added? method
activemodel/lib/active_model/errors.rb
の修正です。
ActiveModel::Errors#added?
で指定されたattribute
が追加されているかチェックする前に、値をSymbolに変換するよう修正しています。
added?
のattribute
にStringが指定された場合にも正しくチェック出来るようにする為。
Stub with Minitest instead of Mocha
Active Recordのテストの修正です。
mock処理に、mochaではなくMinitestのMockを使用するよう修正しています。
Fix document issue in active record callback about after_touch
hook.
rails guideのActive Record Callbacks
の修正です。
after_touch
の項にあるexampleで、記載されていた実行結果と実際の内容が異なっていた(callbackの実行順が異なっていた)のを修正しています。
test_should_impose_childless_html_tags_in_html failure with JRuby
actionpack/test/controller/test_case_test.rb
の修正です。
test_should_impose_childless_html_tags_in_html
でJRubyとCRubyとでcss selectorの指定をわけています。
+ if defined?(JRUBY_VERSION) + # https://github.com/sparklemotion/nokogiri/issues/1653 + # HTML parser "fixes" "broken" markup in slightly different ways + assert_select "root > map > area + p" + else + assert_select "root > area + p" + end
assert対象のHTMLはタグの構成が正しくないHTML(area
タグの親がいない)なのですが、このHTMLをnokogiriでparseした場合の結果が、CRubyとJRubyで異なる結果になる為。
具体的には、<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><area><p>content</p></area></root>
というようなHTMLをパースした場合、
# jruby / nekohtml <html> <head></head> <body> <root><map><area><p>content</p></map></root> </body> </html>
# mri / libxml2 <html> <body> <root><area><p>content</p></root> </body> </html>
となるとの事です。