aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/output_safety.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-09-08 04:48:18 -0700
committerXavier Noria <fxn@hashref.com>2011-09-08 04:56:31 -0700
commitf7627de206f534cfddfecbb5db7ac894c724e5a8 (patch)
tree270036fe3de6eaf6ca916edc628b525b596d2bac /activesupport/lib/active_support/core_ext/string/output_safety.rb
parent06b218dd957d7454d75eeac301a1853793a631f8 (diff)
downloadrails-f7627de206f534cfddfecbb5db7ac894c724e5a8.tar.gz
rails-f7627de206f534cfddfecbb5db7ac894c724e5a8.tar.bz2
rails-f7627de206f534cfddfecbb5db7ac894c724e5a8.zip
copy-edits a couple of exception messages
"Safe Buffer" should either be the constant with the class name, or go in lower case. I've chosen to follow the same terminology that is used in the AS core extensiong guide, "safe string", though "safe buffer" is also used elsewhere, we should pick one.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/output_safety.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/output_safety.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb
index 6e8f72e2b3..9f5cab6487 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -158,17 +158,17 @@ module ActiveSupport #:nodoc:
UNAVAILABLE_STRING_METHODS.each do |unavailable_method|
class_eval <<-EOT, __FILE__, __LINE__
# def gsub(*args)
- # raise NoMethodError, "gsub cannot be used with a Safe Buffer object. You should use object.to_str.gsub"
+ # raise NoMethodError, "gsub cannot be used with a safe string. You should use object.to_str.gsub."
# end
def #{unavailable_method}(*args)
- raise NoMethodError, "#{unavailable_method} cannot be used with a Safe Buffer object. You should use object.to_str.#{unavailable_method}"
+ raise NoMethodError, "#{unavailable_method} cannot be used with a safe string. You should use object.to_str.#{unavailable_method}."
end
# def gsub!(*args)
- # raise NoMethodError, "gsub! cannot be used with a Safe Buffer object. You should use object.to_str.gsub!"
+ # raise NoMethodError, "gsub! cannot be used with a safe string. You should use object.to_str.gsub!."
# end
def #{unavailable_method}!(*args)
- raise NoMethodError, "#{unavailable_method}! cannot be used with a Safe Buffer object. You should use object.to_str.#{unavailable_method}!"
+ raise NoMethodError, "#{unavailable_method}! cannot be used with a safe string. You should use object.to_str.#{unavailable_method}!."
end
EOT
end