diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 64f314a7f6..b5b636d1a4 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -75,7 +75,7 @@ module ActiveRecord if PGconn.respond_to?(:unescape_bytea) self.class.module_eval do define_method(:binary_to_string) do |value| - if value =~ /\\\\\d{3}/ + if value =~ /\\\d{3}/ PGconn.unescape_bytea(value) else value @@ -85,7 +85,7 @@ module ActiveRecord else self.class.module_eval do define_method(:binary_to_string) do |value| - if value =~ /\\\\\d{3}/ + if value =~ /\\\d{3}/ result = '' i, max = 0, value.size while i < max |