aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-08-28 09:19:11 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-08-28 09:19:11 -0700
commit8c52480ba6071a12b97f124d9f21df2c39df3ed3 (patch)
treeb0c41cbee61c699f74ae6a09dbab4b604f8df122 /activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
parent4e68c5dc5712e1d560d3ade694e3f840637baa47 (diff)
downloadrails-8c52480ba6071a12b97f124d9f21df2c39df3ed3.tar.gz
rails-8c52480ba6071a12b97f124d9f21df2c39df3ed3.tar.bz2
rails-8c52480ba6071a12b97f124d9f21df2c39df3ed3.zip
Avoid using heredoc for user warnings
Using heredoc would enforce line wrapping to whatever column width we decided to use in the code, making it difficult for the users to read on some consoles. This does make the source code read slightly worse and a bit more error-prone, but this seems like a fair price to pay since the primary purpose for these messages are for the users to read and the code will not stick around for too long.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb8
1 files changed, 4 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 ae967d5167..84b9490ba3 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
@@ -25,10 +25,10 @@ module ActiveRecord
if !infinity?(from) && extracted[:exclude_start]
if from.respond_to?(:succ)
from = from.succ
- ActiveSupport::Deprecation.warn <<-MESSAGE
-Excluding the beginning of a Range is only partialy supported through `#succ`.
-This is not reliable and will be removed in the future.
- MESSAGE
+ 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."
else
raise ArgumentError, "The Ruby Range object does not support excluding the beginning of a Range. (unsupported value: '#{value}')"
end