提交 b6e00c67 编写于 作者: C Carlos Antonio da Silva

Bring back changelog entries for Active Support

Removed in 0228a73b, pull request #7310.
上级 a6e0d8cf
## Rails 4.0.0 (unreleased) ##
* ActiveSupport::JSON::Variable is deprecated. Define your own #as_json and
#encode_json methods for custom JSON string literals.
*Erich Menge*
* Add String#indent. *fxn & Ace Suares*
* Inflections can now be defined per locale. `singularize` and `pluralize`
accept locale as an extra argument.
*David Celis*
* `Object#try` will now return nil instead of raise a NoMethodError if the
receiving object does not implement the method, but you can still get the
old behavior by using the new `Object#try!`.
*DHH*
* `ERB::Util.html_escape` now escapes single quotes. *Santiago Pastorino*
* `Time#change` now works with time values with offsets other than UTC or the local time zone. *Andrew White*
......
......@@ -37,7 +37,7 @@ def try(*a, &b)
public_send(*a, &b) if respond_to?(a.first)
end
end
# Same as #try, but will raise a NoMethodError exception if the receiving is not nil and
# does not implemented the tried method.
def try!(*a, &b)
......@@ -63,7 +63,7 @@ class NilClass
def try(*args)
nil
end
def try!(*args)
nil
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册