aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-10-27 09:31:47 +0200
committerGitHub <noreply@github.com>2016-10-27 09:31:47 +0200
commit1aa9d3903d16e623837bf8ff7deefc865fc24502 (patch)
treeedea51a20f44ad1bdd1d3f72d57ac86cf98b1e61 /activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb
parent56832e791f3ec3e586cf049c6408c7a183fdd3a1 (diff)
parent48cc754a1070cfc4fefdd49475aea3fc9c1a5e2f (diff)
downloadrails-1aa9d3903d16e623837bf8ff7deefc865fc24502.tar.gz
rails-1aa9d3903d16e623837bf8ff7deefc865fc24502.tar.bz2
rails-1aa9d3903d16e623837bf8ff7deefc865fc24502.zip
Merge pull request #26899 from kamipo/use_regex_match
Use Regexp#match? rather than Regexp#===
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb
index 74bff229ea..302d393277 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb
@@ -34,11 +34,11 @@ module ActiveRecord
end
def binary?
- /\A[01]*\Z/ === value
+ /\A[01]*\Z/.match?(value)
end
def hex?
- /\A[0-9A-F]*\Z/i === value
+ /\A[0-9A-F]*\Z/i.match?(value)
end
protected