aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #21467 from yui-knk/doc/subscribeZachary Scott2015-09-021-2/+2
|\ | | | | [ci skip] Add description about which object
| * [ci skip] Add description about which objectyui-knk2015-09-021-2/+2
| | | | | | | | `ActiveSupport::Notifications.subscribe` expects as second parameter.
* | ArrayInquirer to correctly find symbols or stringsLeigh Halliday2015-08-281-1/+1
|/ | | | | | | | | The problem existed where if your ArrayInquirer values were strings but you checked them using any? with a symbol, it would not find the value. Now it will correctly check whether both the String form or the Symbol form are included in the Array. `
* Tiny documentation improvements [ci skip]Robin Dupret2015-08-281-5/+6
|
* - Extracted `DELIMITED_REGEX` to `delimited_regex` method and made use of ↵Vipul A M2015-08-282-2/+12
| | | | | | | | | | user passed `options[:delimited_regex]` if available. Changed `DELIMITED_REGEX` to `DEFAULT)DELIMITED_REGEX` to signify what it means. - Added tests for number to delimited and number to currency in both actionview and activesupport. Changes Changes
* 10X speed improvements for AS::Dependencies.loadable_constants_for_pathJean Boussier2015-08-271-5/+5
| | | | | | | | | | | | | | | | | | | | When the autoload_paths start to grows, this methods is quite a hotspot >> ActiveSupport::Dependencies.autoload_paths.size => 49 >> Benchmark.ips { |x| x.report('baseline') { ActiveSupport::Dependencies.loadable_constants_for_path(File.expand_path('app/models/shop')) }} Calculating ------------------------------------- baseline 90.000 i/100ms ------------------------------------------------- baseline 1.073k (±20.2%) i/s - 4.950k After the patch Calculating ------------------------------------- patched 883.000 i/100ms ------------------------------------------------- patched 11.050k (±19.7%) i/s - 50.331k
* Fixed to_datetime docs [ci skip]Ronak Jangir2015-08-261-2/+3
|
* Merge pull request #21281 from ronakjangir47/added_docsRafael Mendonça França2015-08-251-1/+10
|\ | | | | Added docs for TimeWithZone [ci skip]
| * Added docs for TimeWithZone [ci skip]Ronak Jangir2015-08-181-1/+10
| |
* | use `caller_locations` instead of `caller`Aaron Patterson2015-08-242-3/+14
| | | | | | | | | | We have `caller_locations`, so we don't need to parse the strings in the callstack.
* | minor documentation improvement [ci skip]Sam Auciello2015-08-241-2/+2
| |
* | temp files are no more requireGaurav Sharma2015-08-251-2/+0
| | | | | | `:nail_care:`
* | Merge branch 'master' of github.com:rails/railsVijay Dev2015-08-2431-159/+273
|\ \ | | | | | | | | | | | | Conflicts: guides/source/security.md
| * \ Merge pull request #16245 from byroot/more-atomic-writeMatthew Draper2015-08-211-27/+29
| |\ \ | | | | | | | | File renaming should be the last operation of an atomic write
| | * | File renaming should be the last operation of an atomic writeJean Boussier2015-08-201-27/+29
| | | |
| * | | Merge pull request #21300 from jonahb/cacheYves Senn2015-08-201-1/+1
| |\ \ \ | | | | | | | | | | Correct cache store superclass in comment [ci skip]
| | * | | Correct cache store superclass in commentJonah Burke2015-08-191-1/+1
| | | |/ | | |/|
| * | | Merge pull request #21279 from ronakjangir47/test_cleanupKasper Timm Hansen2015-08-201-2/+4
| |\ \ \ | | |/ / | |/| | Cleaned up generators tests using internal assertion helper
| | * | Cleaned up generators tests using internal assertion helperRonak Jangir2015-08-201-2/+4
| | |/
| * / Use == 0 instead of .zero? in #tryJean Boussier2015-08-171-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Replacing lambda with proc getting argument error because of it.Ronak Jangir2015-08-171-1/+1
| |
| * Merge pull request #21025 from ronakjangir47/assertsKasper Timm Hansen2015-08-131-1/+5
| |\ | | | | | | Added helper methods to stub any instance
| | * Added helper methods to stub any instanceRonak Jangir2015-08-131-1/+5
| | |
| * | Merge pull request #21217 from myrridin/myrridin-documentation-updatesZachary Scott2015-08-122-4/+4
| |\ \ | | | | | | | | [ci skip] Documentation: Switch around a common phrase for readability
| | * | [ci skip] Switch around a common idiom for readabilityThomas Hart II2015-08-052-4/+4
| | | |
| * | | [ci skip] Fix rdoc markupakihiro172015-08-121-1/+1
| | |/ | |/|
| * | :nodoc: internal class [ci skip]Godfrey Chan2015-08-101-1/+1
| | |
| * | Deprecate the :prefix option of `number_to_human_size`Jean Boussier2015-08-102-2/+4
| | |
| * | Merge pull request #21124 from kirs/feature/reload-i18nKasper Timm Hansen2015-08-101-2/+17
| |\ \ | | | | | | | | Reload I18n.load_path in development
| | * | Reload I18n locales in developmentKir Shatrov2015-08-101-2/+17
| | | |
| * | | Merge pull request #21173 from repinel/fix-callback-terminator-docsClaudio B.2015-08-081-3/+3
| |\ \ \ | | | | | | | | | | [ci skip] Fix the AS::Callbacks terminator docs
| | * | | [ci skip] Fix the AS::Callbacks terminator docsRoque Pinel2015-08-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The second argument of the terminator lambda is no longer the result of the callback, but the result lambda. https://github.com/rails/rails/blob/3a7609e2bafee4b071fe35136274e6ccbae8cacd/activesupport/test/callbacks_test.rb#L553
| * | | | replace each with each_key when only the key is neededAaron Lasseigne2015-08-081-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using each_key is faster and more intention revealing. Calculating ------------------------------------- each 31.378k i/100ms each_key 33.790k i/100ms ------------------------------------------------- each 450.225k (± 7.0%) i/s - 2.259M each_key 494.459k (± 6.3%) i/s - 2.467M Comparison: each_key: 494459.4 i/s each: 450225.1 i/s - 1.10x slower
| * | | Regexp#=== is faster than String#=~schneems2015-08-071-1/+1
| | | | | | | | | | | | | | | | Discussion https://github.com/JuanitoFatas/fast-ruby/pull/59#issuecomment-128513763
| * | | Only invoke the default block for mattr_accessor once so that it does not ↵Lachlan Sylvester2015-08-071-1/+1
| | | | | | | | | | | | | | | | cause issues if it is not idempotent
| * | | speed up code and avoid unnecessary MatchData objectsAaron Lasseigne2015-08-061-1/+1
| |/ /
| * | Merge pull request #21087 from vngrs/fix_hash_except_docKasper Timm Hansen2015-08-031-8/+9
| |\ \ | | | | | | | | Fix the documentation of Hash#except method [ci skip]
| | * | Fix the documentation of Hash#except method [ci skip]Mehmet Emin İNAÇ2015-08-031-8/+9
| | | | | | | | | | | | | | | | fix minor problems
| * | | [ci skip] Update Time#advance documentation with examplesMichael Stock2015-08-021-0/+6
| |/ /
| * | String#freeze optimizationsschneems2015-07-302-2/+2
| | |
| * | Decrease allocations in transliterateschneems2015-07-301-5/+13
| | | | | | | | | | | | | | | | | | We can save a few objects by freezing the `replacement` string. We save a few more by down-casing the string in memory instead of allocating a new one. We save far more objects by checking for the default separator `"-"`, and using pre-generated regular expressions. We will save 209,231 bytes and 1,322 objects.
| * | Decrease string allocations in apply_inflectionsschneems2015-07-292-5/+36
| |/ | | | | | | | | | | In `apply_inflections` a string is down cased and some whitespace stripped in the front (which allocate strings). This would normally be fine, however `uncountables` is a fairly small array (10 elements out of the box) and this method gets called a TON. Instead we can keep an array of valid regexes for each uncountable so we don't have to allocate new strings. This change buys us 325,106 bytes of memory and 3,251 fewer objects per request.
| * Tiny documentation edits [ci skip]Robin Dupret2015-07-281-1/+1
| |
| * Add `:nodoc:` for internal testing methods [ci skip]Robin Dupret2015-07-281-2/+2
| |
| * Merge pull request #20928 from matthewd/unload-interlockMatthew Draper2015-07-243-34/+51
| |\ | | | | | | We need stricter locking before we can unload
| | * Handle thread death during lock acquisitionMatthew Draper2015-07-211-4/+6
| | | | | | | | | | | | | | | | | | Specifically, clean up if the thread is killed while it's blocked awaiting the lock... if we get killed on some other arbitrary line, the result remains quite undefined.
| | * Adjust expectations around purpose/compatibility optionsMatthew Draper2015-07-211-1/+1
| | |
| | * Order of execution is only guaranteed if upgradingMatthew Draper2015-07-211-1/+1
| | | | | | | | | | | | | | | If the thread isn't yet holding any form of lock, it has no claim over what may / may not run while it's blocked.
| | * Fix ShareLock issues.thedarkone2015-07-201-2/+2
| | |
| | * We need stricter locking before we can unloadMatthew Draper2015-07-203-33/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, the "loose upgrades" behaviour that allows us to obtain an exclusive right to load things while other requests are in progress (but waiting on the exclusive lock for themselves) prevents us from treating load & unload interchangeably: new things appearing is fine, but they do *not* expect previously-present constants to vanish. We can still use loose upgrades for unloading -- once someone has decided to unload, they don't really care if someone else gets there first -- it just needs to be tracked separately.