mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
remove backported string interpolation
This commit is contained in:
parent
ea50d53da1
commit
80b681686a
3 changed files with 0 additions and 17 deletions
|
@ -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'
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
require 'active_support/i18n'
|
||||
require 'i18n/core_ext/string/interpolate'
|
|
@ -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?+:
|
||||
|
|
Loading…
Reference in a new issue