aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorDamien Mathieu <42@dmathieu.com>2011-06-17 18:17:28 +0200
committerDamien Mathieu <42@dmathieu.com>2011-06-22 15:26:21 +0200
commit9fadf385d892931190b465b691ecef796f0eea5c (patch)
treed5a6816c7b36a12ad8231cfde95166a0da6d1787 /activesupport/lib/active_support/core_ext
parent0dd32e8edbc2ba5d4496e7f8063536c507b74c5f (diff)
downloadrails-9fadf385d892931190b465b691ecef796f0eea5c.tar.gz
rails-9fadf385d892931190b465b691ecef796f0eea5c.tar.bz2
rails-9fadf385d892931190b465b691ecef796f0eea5c.zip
calling unsafe methods which don't return a string shouldn't fail
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/string/output_safety.rb4
1 files changed, 2 insertions, 2 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 71f3879e49..a19b5c95c7 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -137,8 +137,8 @@ module ActiveSupport #:nodoc:
UNSAFE_STRING_METHODS.each do |unsafe_method|
class_eval <<-EOT, __FILE__, __LINE__
- def #{unsafe_method}(*args)
- super.to_str
+ def #{unsafe_method}(*args, &block)
+ to_str.#{unsafe_method}(*args, &block)
end
def #{unsafe_method}!(*args)