- 18 8月, 2015 1 次提交
-
-
由 Jean Boussier 提交于
The perf gain is relatively minor but consistent: ``` Calculating ------------------------------------- 0.zero? 137.091k i/100ms 1.zero? 137.350k i/100ms 0 == 0 142.207k i/100ms 1 == 0 144.724k i/100ms ------------------------------------------------- 0.zero? 8.893M (± 6.5%) i/s - 44.280M 1.zero? 8.751M (± 6.4%) i/s - 43.677M 0 == 0 10.033M (± 7.0%) i/s - 49.915M 1 == 0 9.814M (± 8.0%) i/s - 48.772M ``` And try! is quite a big hotspot for us so every little gain is appreciable.
-
- 20 5月, 2015 2 次提交
-
-
由 Godfrey Chan 提交于
* Rename `ActiveSupport::Try` => `ActiveSupport::Tryable` * Include the modules inline * `private` indentation
-
由 Nate Smith 提交于
`Delegator` inherits from `BasicObject`, which means that it will not have `Object#try` defined. It will then delegate the call to the underlying object, which will not (necessarily) respond to the method defined in the enclosing `Delegator`. This patches `Delegator` with the `#try` method to work around the surprising behaviour. Fixes #5790
-
- 03 1月, 2015 1 次提交
-
-
由 Robin Dupret 提交于
-
- 22 12月, 2014 1 次提交
-
-
由 claudiob 提交于
Also add doc examples for `Object.nil`. [ci skip]
-
- 18 12月, 2014 1 次提交
-
- 25 10月, 2014 3 次提交
-
-
由 Godfrey Chan 提交于
@carlosantoniodasilva pointed out that when `@person` is nil then this would blow up when you ended up calling `#first`on `nil`. > "there’s no way to break a try chain when you enter it :D" [ci skip]
-
由 Zachary Scott 提交于
-
由 Eugene Gilburg 提交于
- better `if` example - Added chaining example to the try method description - Documented the `respond_to?` check to the try method description - Clearer wording to explain that argument error is raised on argument mismatch to responding method, rather than to non-responding method (which is handled without exception by `try`) - `.any?` is more precise than `! .blank?` - Don't need to use `try` on `children` as (for regular associations) they will always be a collection or array that responds to `first` - Fix typos/grammar
-
- 24 10月, 2014 1 次提交
-
-
由 Ari Pollak 提交于
-
- 23 10月, 2014 1 次提交
-
-
由 Ari Pollak 提交于
Based on commit 5e51bdda.
-
- 30 8月, 2014 1 次提交
-
-
由 David Heinemeier Hansson 提交于
We tenderized the wrong method! Object#try already had the yield option, just needed some tenderloving instance_eval to fit the bill
-
- 11 9月, 2013 1 次提交
-
-
由 Jay Hayes 提交于
-
- 18 8月, 2013 1 次提交
-
- 27 7月, 2013 1 次提交
-
-
由 Jay Hayes 提交于
-
- 29 1月, 2013 1 次提交
-
-
由 Xavier Noria 提交于
-
- 11 8月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Removed in 0228a73b, pull request #7310.
-
- 28 7月, 2012 2 次提交
-
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
will now return nil instead of raise a NoMethodError if the receiving object does not implement the method
-
- 05 6月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 20 5月, 2012 1 次提交
-
-
由 Piotr Sarnacki 提交于
[ci skip] closes #5790
-
- 13 5月, 2012 2 次提交
-
-
由 Oscar Del Ben 提交于
-
由 Vasiliy Ermolovich 提交于
-
- 12 5月, 2012 1 次提交
-
-
由 Vasiliy Ermolovich 提交于
-
- 06 10月, 2011 1 次提交
-
-
由 José Valim 提交于
This reverts commit 29a5aeaa.
-
- 22 5月, 2011 1 次提交
-
-
由 dmathieu 提交于
-
- 20 4月, 2011 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 18 4月, 2011 4 次提交
-
-
由 Sebastian Martinez 提交于
-
由 Sebastian Martinez 提交于
-
由 Sebastian Martinez 提交于
-
由 Sebastian Martinez 提交于
-
- 05 3月, 2011 1 次提交
-
-
由 R.T. Lechow 提交于
-
- 04 3月, 2011 1 次提交
-
-
由 R.T. Lechow 提交于
-
- 03 12月, 2010 1 次提交
-
-
由 Santiago Pastorino 提交于
-
- 14 11月, 2010 1 次提交
-
-
由 raggi 提交于
Add support for try to just yield the object to a block if no method is to be called. Kind of like a tap_if_present.
-
- 12 9月, 2010 1 次提交
-
-
- 21 3月, 2009 1 次提交
-
-
由 Jeremy Kemper 提交于
-
- 07 2月, 2009 1 次提交
-
-
由 Jeremy Kemper 提交于
-
- 02 2月, 2009 1 次提交
-
-
由 Pratik Naik 提交于
-
- 26 1月, 2009 1 次提交
-
-
由 Christos Zisopoulos 提交于
Updated Object#try doc to match lifo's "no code change" revert c9b8a26b
-