diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-08-20 08:56:54 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-08-20 08:56:54 +0900 |
commit | f1d9fc5d346a6a1bc6728bad544196c62fc50cac (patch) | |
tree | e0554809e123026dcb324b6cd5cd3968a9630466 /activerecord/lib | |
parent | c1d612cf5a9d25133ab50cc057ebb35d337e37fa (diff) | |
download | rails-f1d9fc5d346a6a1bc6728bad544196c62fc50cac.tar.gz rails-f1d9fc5d346a6a1bc6728bad544196c62fc50cac.tar.bz2 rails-f1d9fc5d346a6a1bc6728bad544196c62fc50cac.zip |
Fix `OID::Bit#cast_value`
Fixes #26137.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb | 4 |
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 a6b5a89ec0..74bff229ea 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb @@ -7,7 +7,7 @@ module ActiveRecord :bit end - def cast(value) + def cast_value(value) if ::String === value case value when /^0x/i @@ -16,7 +16,7 @@ module ActiveRecord value # Bit-string notation end else - value + value.to_s end end |