なるようになるブログ

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

rails commit log流し読み(2017/11/23)

2017/11/23分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activesupport/CHANGELOG.md


Update Action Cable Overview Guide [ci skip]

rails guideのAction Cable Overviewの修正です。

guide全体のグラマー、フォーマットの修正を行っています。


Make ActiveSupport::TimeZone.all independent of previous lookups (#31176)

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

ActiveSupport::TimeZone.allの結果が、メソッド実行前にActiveSupport::TimeZoneのルックアップ処理をしていたかどうかで結果が変わっていたのを、必ずActiveSupport::TimeZone::MAPPINGに定義されている値のみを返すよう修正しています。


Update incorrect backtick usage in RDoc to teletype

各メソッドのdocでエスケープにバッククォートを使用していた箇所があったのを、まとめて+、またはttタグを使用するよう修正しています。


Fix CustomUrls#direct doc formatting

actionpack/lib/action_dispatch/routing/mapper.rbのdocの修正です。

CustomUrls#directメソッドのdocのフォーマットの修正を行っています。


Merge pull request #31194 from yahonda/attributes_before_type_cast_on_boolean_with_jruby

activerecord/test/cases/attribute_methods_test.rbの修正です。

attributes_before_type_castメソッドでbooleanの値を取得する際のテストで、JRubyとその他で結果の取得処理を分岐していたのを、分岐を削除しています。

-      if RUBY_PLATFORM.include?("java")
-        # JRuby will return the value before typecast as string.
-        assert_equal "0", bool.reload.attributes_before_type_cast["value"]
-      else
-        assert_equal 0, bool.reload.attributes_before_type_cast["value"]
-      end
+      assert_equal 0, bool.reload.attributes_before_type_cast["value"]

Active Record JDBC AdapterでRails 5.1をサポートした際に同じ結果がかえるよう対応したらしく、分岐が不要になった為上記修正を行っています。


Fix unstable test test_delegate_socket_errors_to_on_error_handler

actioncable/test/connection/client_socket_test.rbの修正です。

socket errorsが起きた際に、on_error handlerにdelegateされる事を確認するテストがときおり落ちていたのを修正しています。

異なるスレッドから同じioに対して書き込み処理をしようとした為エラーになっていらたらしく、server側の書き込みが終わるのをまってから処理を行うよう修正しています。