Commit Graph

3182 Commits

Author SHA1 Message Date
Aaron Patterson
ad95a61b62 Merge pull request #4911 from Floppy/master
Reduce FILENAME_MAX_SIZE in ActiveSupport::Cache::FileStore
2012-03-30 17:43:55 -07:00
Dmitry Plashchynski
96b951ce24 validate attribute names in class and module attribute accessors 2012-03-30 15:45:46 +03:00
Dmitrii Golub
ba9537c275 remove redundant variable 2012-03-28 03:09:40 +04:00
Aaron Patterson
281b31b4bb Merge pull request #5331 from castlerock/remove_unused_require
remove unused require from AS/core_ext/class/delegating_att.rb
2012-03-26 16:12:40 -07:00
Vasiliy Ermolovich
633ee64e20 String#titleize works properly with smart quotes, closes #5584 2012-03-26 21:18:25 +03:00
Piotr Sarnacki
a4bf3045ca Merge pull request #5566 from lest/patch-3
fix HashWithIndifferentAccess.[] method
2012-03-25 04:16:53 -07:00
Arun Agrawal
ef864c3a22 removed warning: shadowing outer local variable - exception 2012-03-24 10:35:36 +05:30
Sergey Nartimov
2ee28b2bf8 fix HashWithIndifferentAccess.[] method 2012-03-23 23:09:29 +03:00
Piotr Sarnacki
d1887d384a Fix tests, when creating rescue handler, we need to check for arity now
Before it was handled by Proc.bind, but since Proc.bind has been
deprecated, this is no longer the case and returned handler
needs to match rescuer.
2012-03-23 11:49:25 +01:00
Sergey Nartimov
9c857db757 deprecate Proc#bind that can cause symbol memory leak 2012-03-22 22:25:55 +03:00
Aaron Patterson
b6c128d6d0 remove duplicate requires. thanks @atambo 2012-03-21 16:42:28 -07:00
Aaron Patterson
c7847f14fd evented listeners can subscribe to any message 2012-03-21 16:18:47 -07:00
Aaron Patterson
6989db9238 evented subscribers work 2012-03-21 16:18:47 -07:00
Aaron Patterson
f08f8750a5 start / finish events are sent by the instrumenter 2012-03-21 16:18:46 -07:00
Aaron Patterson
60736fec53 push the autoloads up to requires 2012-03-21 16:18:46 -07:00
Aaron Patterson
d99c790f65 split subscribers based on pattern type 2012-03-21 11:12:58 -07:00
Aaron Patterson
bdf7624a59 probably should require the objects we monkey patch. 2012-03-20 10:38:43 -07:00
Aaron Patterson
c317c5b25d search private and protected methods for convert_key 2012-03-20 09:58:42 -07:00
Aaron Patterson
440559f661 bigdecimal can be duped on Ruby 2.0 2012-03-20 09:51:22 -07:00
FND
e0ee14ed23 Provide access to logger instance within TaggedLogging blocks
this improves encapsulation, simplifying occurrences like the following:

    Rails.logger.tagged("DEBUG") { Rails.logger.debug(msg) }

... by removing the need to rely on (i.e. repeat) outer variables:

    Rails.logger.tagged("DEBUG") { |logger| logger.debug(msg) }
2012-03-19 10:49:27 +01:00
Aaron Patterson
090156adeb use empty? on the hash to avoid another method call 2012-03-16 12:15:31 -07:00
Aaron Patterson
4c8a5a0087 removed unnecessary calls to "freeze" 2012-03-16 11:50:15 -07:00
Aaron Patterson
0ae5807fa3 make stubbing Time.now easier 2012-03-16 10:36:18 -07:00
Carlos Antonio da Silva
c045eebd5d Remove deprecation from AS::Deprecation behavior, some minor cleanups
* Refactor log subscriber, use select! to avoid a new object
* Remove deprecation messages related to AS::Deprecation behavior
  This was added about 2 years ago for Rails 3:
  d4c7d3fd94
* Remove some not used requires
* Refactor delegate to avoid string conversions and if statements inside each block
2012-03-16 09:01:48 -03:00
Jon Rowe
4073505065 escape commas in paths before globbing to avoid infinite hang in Dir[] 2012-03-15 12:21:20 +00:00
Aaron Patterson
7f40b9cd42 make the tagged formatter extend the existing formatter 2012-03-12 11:34:02 -07:00
Aaron Patterson
0f5b32cd08 Merge pull request #5394 from erichmenge/master
retrieve_cache_key should work on objects that act like arrays.
2012-03-12 10:33:50 -07:00
Erich Menge
be623677a3 Allow retrieve_cache_key to work on collections such as ActiveRecord::Relation. 2012-03-12 12:29:30 -05:00
Pan Thomakos
6b480d2e82 Improved ActiveSupport::Autoload performance.
`ActiveSupport::Autoload#autoload` performance is improved in the default
case where a path is present. Since the full path name is not generated, it
isn't necessary to determine the full constant name either. This results in a
3x performance gain and reduces the number of Ruby objects generated. For a full
benchmark check [this gist](https://gist.github.com/2020228).
2012-03-11 23:26:48 -07:00
Vishnu Atrai
82a62b804c remove unused require from AS/core_ext/class/delegating_att.rb 2012-03-10 18:02:08 +05:30
Aaron Patterson
085cb3b9af Merge pull request #5287 from nashby/hash-slice-extract
refactor Hash#slice and Hash#extract!
2012-03-08 09:54:34 -08:00
José Valim
d1a4faf61f Ensure load hooks can be called more than once with different contexts. 2012-03-06 22:05:07 +01:00
Vijay Dev
7c90d91c3c Clean up module docs [ci skip]
Removed some useless docstrings and no-doc'ed some.
2012-03-07 01:04:14 +05:30
Vasiliy Ermolovich
74cb4b63bd refactor Hash#slice and Hash#extract! 2012-03-06 08:33:14 +03:00
Carlos Antonio da Silva
681d89f96b Stop SafeBuffer#clone_empty from issuing warnings
Logic in clone_empty method was dealing with old @dirty variable, which
has changed by @html_safe in this commit:
139963c99a

This was issuing a "not initialized variable" warning - related to:
https://github.com/rails/rails/pull/5237

The logic applied by this method is already handled by the [] override,
so there is no need to reset the variable here.
2012-03-02 11:07:42 -03:00
Aaron Patterson
139963c99a Merge branch 'master-security'
* master-security:
  Ensure [] respects the status of the buffer.
  delete vulnerable AS::SafeBuffer#[]
  use AS::SafeBuffer#clone_empty for flushing the output_buffer
  add AS::SafeBuffer#clone_empty
  fix output safety issue with select options

Conflicts:
	actionpack/lib/action_view/helpers/tags/base.rb
2012-03-01 09:56:04 -08:00
José Valim
8ccaa34103 Ensure [] respects the status of the buffer. 2012-02-29 16:09:02 -08:00
homa
ef79b8400f Inflector/constantize - inject method lets us to avoid using another variable 2012-02-28 18:34:19 +01:00
Xavier Noria
699ba8ab52 Merge pull request #4284 from mattdbridges/time_calculation_aliases
Added aliases for prev_year, prev_month, and prev_week in Time and Date calculations
2012-02-28 01:37:19 -08:00
Aaron Patterson
f42c96331a call binmode on the tempfile for Ruby 1.8 compatibility 2012-02-27 11:57:04 -08:00
Aaron Patterson
9ad7767aba Merge pull request #5179 from RalphShnelvar/Binary_mode_Window_bug
Binary mode window bug
2012-02-27 10:10:53 -08:00
Xavier Noria
31ceb5e67b decouples the implementation of the inflector from its test suite
Trying alternative implementations of the inflections
is hard because the suite is coupled with the current
one, setting ivars by hand etc. This commit relies on
initialize_dup, as long as you maintain that one you
can tweak the implementation.
2012-02-24 15:06:17 -08:00
Bogdan Gusiev
10bac29b33 AS::Callbacks: deprecate rescuable option 2012-02-22 17:43:13 +02:00
Matt Bridges
d6366625e0 Adding :last_week, :last_month, and :last_year aliases to Time and Date
core extensions
2012-02-21 16:27:08 -06:00
Vishnu Atrai
cd641fa96e ordered_options will work if inherited from Hash, remove OrderedHash usage 2012-02-21 23:08:36 +05:30
Aaron Patterson
12e2405a27 Merge pull request #5108 from mirakui/patch-1
Bug: cache_key.size doesn't return length of filename but size of file
2012-02-21 09:14:19 -08:00
Santiago Pastorino
67a5157974 Merge pull request #5112 from nupurjain/activesupport_cache_refactor
suggested changes.
2012-02-21 03:44:06 -08:00
Nupur Jain
f0baa1c301 suggested changes. 2012-02-21 16:50:35 +05:30
Issei Naruta
0b1ce07822 Bug: cache_path.size doesn't return length of filename but size of file if cache_path is Pathname. 2012-02-21 18:35:31 +09:00
Akira Matsuda
71d8c77e5a delete vulnerable AS::SafeBuffer#[] 2012-02-20 16:02:45 -08:00