diff --git a/activesupport/lib/active_support/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb index ab49af55bf5c98aaa9c1a409122ef98ee64b0625..fb36262528c4e70f0de452a34da58a8ad24d516c 100644 --- a/activesupport/lib/active_support/core_ext/string.rb +++ b/activesupport/lib/active_support/core_ext/string.rb @@ -6,7 +6,6 @@ require 'active_support/core_ext/string/access' require 'active_support/core_ext/string/xchar' require 'active_support/core_ext/string/behavior' -require 'active_support/core_ext/string/interpolation' require 'active_support/core_ext/string/output_safety' require 'active_support/core_ext/string/exclude' require 'active_support/core_ext/string/strip' diff --git a/activesupport/lib/active_support/core_ext/string/interpolation.rb b/activesupport/lib/active_support/core_ext/string/interpolation.rb deleted file mode 100644 index 7f764e9de1dbd058a7aced054b705949dedf234f..0000000000000000000000000000000000000000 --- a/activesupport/lib/active_support/core_ext/string/interpolation.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'active_support/i18n' -require 'i18n/core_ext/string/interpolate' diff --git a/guides/source/active_support_core_extensions.textile b/guides/source/active_support_core_extensions.textile index bf30ed64c85e5e40d723dbefc0d9d5fc369e670c..afd43ab317d14f3c9a8b9819a62534df88242b32 100644 --- a/guides/source/active_support_core_extensions.textile +++ b/guides/source/active_support_core_extensions.textile @@ -1277,20 +1277,6 @@ The inquiry method converts a string into a +StringInquirer+ object mak "active".inquiry.inactive? # => false -h4. Key-based Interpolation - -In Ruby 1.9 the % string operator supports key-based interpolation, both formatted and unformatted: - - -"Total is %.02f" % {:total => 43.1} # => Total is 43.10 -"I say %{foo}" % {:foo => "wadus"} # => "I say wadus" -"I say %{woo}" % {:foo => "wadus"} # => KeyError - - -Active Support adds that functionality to % in previous versions of Ruby. - -NOTE: Defined in +active_support/core_ext/string/interpolation.rb+. - h4. +starts_with?+ and +ends_with?+ Active Support defines 3rd person aliases of +String#start_with?+ and +String#end_with?+: