なるようになるブログ

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

rails commit log流し読み(2016/11/17)

2016/11/17分のコミットです。

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


Use named parameters instead of assert_valid_keys

activejob/lib/active_job/test_helper.rbの修正です。

assert_enqueued_withassert_performed_withメソッドの引数の指定にキーワード引数を使用するよう修正しています。


Enable JRuby testing for Action Mailer

.travis.ymlの修正です。

CIのテストの対象にJRuby + Action Mailerの組み合わせを追加しています。


Merge pull request #27064 from koic/bump_ruby_versions

.travis.ymlの修正です。

CIで使用するRubyのバージョンをRuby 2.2.6、2.3.2に更新しています。


Enable JRuby testing for Active Job

.travis.ymlの修正です。

CIのテストの対象にJRuby + Active Jobの組み合わせを追加しています。


Make JRUBY_OPTS a global Travis environment variable

.travis.ymlの修正です。

JRUBY_OPTStravisのglobal envに定義するよう修正しています。


use force_encoding instread of encode! to avoid UndefinedConversionError

activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rbの修正です。

ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Array#serializeメソッドでencode処理を行う際に、encode!を使用していたのを、force_encodingを使用するよう修正しています。

-                result.encode!(encoding)
+                result.force_encoding(encoding)

PG::TextEncoder::Array#encodeASCII-8BITでencodeされた値を返すのですが、ASCII-8BITからUTF-8への変換にencode!を使用するとEncoding::UndefinedConversionErrorが発生してしまう可能性がある為、force_encodingを使用するようにしています。


Fix PG prepared statement test

activerecord/test/cases/adapters/postgresql/prepared_statements_test.rbの修正です。

prepared statementのテストのメソッド名がtest_ではじまってなかった(テストが実行されてなかった)のを修正しています。