diff options
author | Xavier Noria <fxn@hashref.com> | 2014-10-28 16:46:19 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2014-10-28 16:46:19 -0700 |
commit | cd45306dbdf229ada6783c36cbd9cc18da26954a (patch) | |
tree | 704402cb6a6ddccc23321d202f0d79fd5a828788 /activerecord/lib/active_record/connection_adapters/postgresql/oid | |
parent | 21f081c0ca86df65c2598e3a273a4c9a785dd5d6 (diff) | |
parent | b3bfa361c503e107aff4dee5edf79bd7fd3d3725 (diff) | |
download | rails-cd45306dbdf229ada6783c36cbd9cc18da26954a.tar.gz rails-cd45306dbdf229ada6783c36cbd9cc18da26954a.tar.bz2 rails-cd45306dbdf229ada6783c36cbd9cc18da26954a.zip |
Merge pull request #17421 from rails/warn-with-heredoc
let warn with heredocs
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/oid')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb index 84b9490ba3..961e6224c4 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/string/filters' + module ActiveRecord module ConnectionAdapters module PostgreSQL @@ -25,10 +27,11 @@ module ActiveRecord if !infinity?(from) && extracted[:exclude_start] if from.respond_to?(:succ) from = from.succ - ActiveSupport::Deprecation.warn \ - "Excluding the beginning of a Range is only partialy supported " \ - "through `#succ`. This is not reliable and will be removed in " \ - "the future." + ActiveSupport::Deprecation.warn(<<-MSG.squish) + Excluding the beginning of a Range is only partialy supported + through `#succ`. This is not reliable and will be removed in + the future. + MSG else raise ArgumentError, "The Ruby Range object does not support excluding the beginning of a Range. (unsupported value: '#{value}')" end |