提交 80b68168 编写于 作者: V Vasiliy Ermolovich

remove backported string interpolation

上级 ea50d53d
......@@ -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'
......
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?+:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册