From 3f7cd2c57151f9873f6e2a06dd020447fd7e360a Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 10 Dec 2016 21:40:20 +0900 Subject: [PATCH] Fix CI failure caused by #25227 and #25280 were merged at the same time --- .../lib/active_record/associations/singular_association.rb | 2 +- .../test/cases/associations/belongs_to_associations_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/associations/singular_association.rb b/activerecord/lib/active_record/associations/singular_association.rb index 6d69f757eb..ee7b7c8bea 100644 --- a/activerecord/lib/active_record/associations/singular_association.rb +++ b/activerecord/lib/active_record/associations/singular_association.rb @@ -58,7 +58,7 @@ def find_target sc.execute(binds, klass, conn) do |record| set_inverse_instance record end.first - rescue RangeError + rescue ::RangeError nil end diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index 2b8d01743f..81a2a161f2 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -1079,7 +1079,7 @@ def self.name; "Temp"; end end comment = model.new - comment.post_id = 10_000_000_000 + comment.post_id = 9223372036854775808 # out of range in the bigint assert_nil comment.post assert_not comment.valid?