diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-15 12:01:47 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-15 12:01:47 -0700 |
commit | bc4ebaf2698353dc3cc0351479a4ed5ed41e2361 (patch) | |
tree | 5ddb133d2cadcebaccfeaa5372fd8fb29f0778c7 | |
parent | ea50d53da1edfed172deaa6fdb5acda29f958bd6 (diff) | |
parent | 80b681686a8ba58a1fd7868c067ecc8bed41df15 (diff) | |
download | rails-bc4ebaf2698353dc3cc0351479a4ed5ed41e2361.tar.gz rails-bc4ebaf2698353dc3cc0351479a4ed5ed41e2361.tar.bz2 rails-bc4ebaf2698353dc3cc0351479a4ed5ed41e2361.zip |
Merge pull request #6327 from nashby/string-interpolation
remove backported string interpolation
3 files changed, 0 insertions, 17 deletions
diff --git a/activesupport/lib/active_support/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb index ab49af55bf..fb36262528 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/inflections' 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 7f764e9de1..0000000000 --- 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 bf30ed64c8..afd43ab317 100644 --- a/guides/source/active_support_core_extensions.textile +++ b/guides/source/active_support_core_extensions.textile @@ -1277,20 +1277,6 @@ The <tt>inquiry</tt> method converts a string into a +StringInquirer+ object mak "active".inquiry.inactive? # => false </ruby> -h4. Key-based Interpolation - -In Ruby 1.9 the <tt>%</tt> string operator supports key-based interpolation, both formatted and unformatted: - -<ruby> -"Total is %<total>.02f" % {:total => 43.1} # => Total is 43.10 -"I say %{foo}" % {:foo => "wadus"} # => "I say wadus" -"I say %{woo}" % {:foo => "wadus"} # => KeyError -</ruby> - -Active Support adds that functionality to <tt>%</tt> 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?+: |