提交 715db1a7 编写于 作者: J Jeremy Kemper

Feature check :force_encoding instead of RUBY_VERSION

上级 db11ef95
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module String #:nodoc:
if RUBY_VERSION < '1.9'
unless '1.9'.respond_to?(:force_encoding)
# Makes it easier to access parts of a string, such as specific characters and substrings.
module Access
# Returns the character at the +position+ treating the string as an array (where 0 is the first character).
......
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module String #:nodoc:
if RUBY_VERSION < '1.9'
unless '1.9'.respond_to?(:force_encoding)
# Define methods for handling unicode data.
module Unicode
# +chars+ is a Unicode safe proxy for string methods. It creates and returns an instance of the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册