diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 9 |
1 files changed, 5 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 c368e7f505..7c21abea72 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -172,14 +172,15 @@ module ActiveSupport #:nodoc: UNSAFE_STRING_METHODS.each do |unsafe_method| if String.new.respond_to?(unsafe_method) - define_method(unsafe_method.to_sym) do |*args, &block| - to_str.send(unsafe_method, *args, &block) + define_method(unsafe_method) do |*args, &block| + to_str.send(unsafe_method, *args, &block) end - define_method("#{unsafe_method}!".to_sym) do |*args| + + define_method("#{unsafe_method}!") do |*args| @html_safe = false super(*args) end - end + end end end end |