diff options
author | Vasiliy Ermolovich <younash@gmail.com> | 2012-05-15 20:53:28 +0300 |
---|---|---|
committer | Vasiliy Ermolovich <younash@gmail.com> | 2012-05-15 20:53:28 +0300 |
commit | 80b681686a8ba58a1fd7868c067ecc8bed41df15 (patch) | |
tree | 5ddb133d2cadcebaccfeaa5372fd8fb29f0778c7 /guides | |
parent | ea50d53da1edfed172deaa6fdb5acda29f958bd6 (diff) | |
download | rails-80b681686a8ba58a1fd7868c067ecc8bed41df15.tar.gz rails-80b681686a8ba58a1fd7868c067ecc8bed41df15.tar.bz2 rails-80b681686a8ba58a1fd7868c067ecc8bed41df15.zip |
remove backported string interpolation
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_support_core_extensions.textile | 14 |
1 files changed, 0 insertions, 14 deletions
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?+: |