Hacker News new | ask | show | jobs
by hueho 3832 days ago
There isn't really anyway to monkeypatch `try` to use the operator. `try` API is inherently based on metaprogramming (passing a symbol to call), and have different semantics than the operator (by default it won't throw if a non-existent method is called in a non-nil object, while the operator will thrown a NoMethodError)

https://github.com/rails/rails/blob/4-2-stable/activesupport...