From a5587efc1903fd27d4b179753aa6e139445ad18c Mon Sep 17 00:00:00 2001 From: wycats Date: Wed, 17 Mar 2010 00:15:55 -0700 Subject: Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM warnings are in dependencies. --- activesupport/lib/active_support/core_ext/string/inflections.rb | 2 -- activesupport/lib/active_support/core_ext/string/output_safety.rb | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/string') diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index fbb7b79fc6..48b028bb64 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -1,5 +1,3 @@ -require 'active_support/inflector' - # String inflections define new methods on the String class to transform names for different purposes. # For instance, you can figure out the name of a database from the name of a class. # 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 9a7c520e75..5babc297c1 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -23,12 +23,14 @@ class ERB end end - undef :h + remove_method(:h) alias h html_escape - module_function :html_escape module_function :h + singleton_class.send(:remove_method, :html_escape) + module_function :html_escape + # A utility method for escaping HTML entities in JSON strings. # This method is also aliased as j. # -- cgit v1.2.3