Yasuo Honda
281b8caf80
Fixed test_nonexisting_method_with_arguments to revert commit 29a5aea
2011-10-06 07:44:48 -04:00
José Valim
82d41c9698
Revert "don't raise NoMethodError the tried method doesn't exists"
...
This reverts commit 29a5aeaae9 .
2011-10-06 00:37:15 +02:00
Jeremy Kemper
c10fcd2637
Merge pull request #2801 from jeremyevans/patch-1
...
Fix obviously breakage of Time.=== for Time subclasses
2011-10-03 10:53:09 -07:00
Christian Höltje
bb5e295d94
Rescuable spelling error
2011-10-03 10:15:31 -04:00
Philippe Huibonhoa
119a484e80
Improved testing so that it tests the real functionality and not the private method.
2011-10-02 01:39:52 -07:00
Philippe Huibonhoa
0baa8f8604
Added fix so that file store does not raise an exception when cache dir does not exist yet. This can happen if a delete_matched is called before anything is saved in the cache.
2011-09-29 18:59:40 -07:00
José Valim
b2f34d1e35
Ensure that constantize just rescues NameError that applies to the constant being currently loaded.
2011-09-23 16:21:49 +02:00
Ryan Oblak
310565f537
Added ActiveSupport::Inflector.safe_constantize and String#safe_constantize; refactored common constantize tests into ConstantizeTestCases
2011-09-23 15:36:33 +02:00
Santiago Pastorino
855184c468
Merge pull request #3096 from phuibonhoa/master
...
FileStore key_file_path does not properly limit filenames to 255 characters
2011-09-22 10:03:54 -07:00
Philippe Huibonhoa
a0352a425f
Updated existing test that fails with this fix ( 8d63678d14). Before the fix the test was giving a false positive, because file_store.key_file_path would return an empty filename (i.e. test/tmp_cache/4D0/F4D rather than test/tmp_cache/4D0/F4D/xxxx…).
...
Even though the fix referenced above divides the filename into directories to prevent it from being too long, it seems that 1000 characters will always raise an error, so reducing the key size to 900).
2011-09-21 21:03:59 -07:00
Philippe Huibonhoa
8d63678d14
Fixed issue in file store where it could create a filename that was too long for the file system. ( https://github.com/rails/rails/issues/3072 )
2011-09-21 21:00:46 -07:00
brainopia
8e3d26733b
Fix test to reflect use of to_param for keys
2011-09-18 23:37:27 +04:00
brainopia
3a04e370e4
Fix Hash#to_query edge case with html_safe string on 1.8 ruby
2011-09-16 22:59:16 +04:00
Willem van Bergen
6d520803ee
Test deprecation warning when not using an options hash as second parameter.
2011-09-15 15:51:30 -04:00
Willem van Bergen
41fea03342
Use an options hash to specify digest/cipher algorithm and a serializer for MessageVerifier and MessageEncryptor.
2011-09-15 14:27:12 -04:00
Willem van Bergen
db040cdf8b
Implement API suggestions of pull request.
2011-09-15 13:15:21 -04:00
Willem van Bergen
a8aaef6762
Fixed tests so that they will also run properly in other timezones.
2011-09-15 09:50:39 -04:00
Willem van Bergen
bffaa888ac
Custom serializers and deserializers in MessageVerifier and MessageEncryptor.
...
By default, these classes use Marshal for serializing and deserializing messages. Unfortunately, the Marshal format is closely associated with Ruby internals and even changes between different interpreters. This makes the resulting message very hard to impossible to unserialize messages generated by these classes in other environments like node.js.
This patch solves this by allowing you to set your own custom serializer and deserializer lambda functions. By default, it still uses Marshal to be backwards compatible.
2011-09-15 08:28:53 -04:00
José Valim
6b010c2690
Revert removing gsub and sub from safe buffer.
2011-09-08 20:54:30 +02:00
Xavier Noria
827fcf453e
this should have gone with the previous commit
2011-09-08 05:02:47 -07:00
Damien Mathieu
3718ccd2a6
remove support of symbols on classify and camelize
2011-09-08 10:22:21 +02:00
Jeremy Evans
da8f00a55c
Add tests for fixes to Time.===
2011-09-07 10:09:04 -07:00
Arun Agrawal
fc5e3ff1ba
We can't simply check the first line of the backtrace,
...
because JRuby reports the call to __send__ in the backtrace.
2011-09-04 15:33:58 +05:30
Prem Sichanugrist
9984266c04
Make ActiveSupport::OrderedHash extractable when using Array#extract_options!
...
`ActiveSupport::OrderedHash` is actually a subclass of the hash, so it does make sense that it should be extractable from the array list.
2011-09-03 14:43:33 +07:00
Jon Leighton
8ba491acc3
Revert all the stuff to do with disallowing non-public methods for Module#delegate
2011-08-25 22:30:42 +01:00
Jonathan del Strother
e0714ee005
Fix autoload_once_paths when using Pathnames & ruby 1.9
...
Under ruby 1.9.2 -
"/var/log".starts_with?(Pathname.new("/var")) # => false
so setting config.autoload_once_paths with Pathnames would not work
2011-08-24 18:14:25 +01:00
Daniel Schierbeck
cacdbb9437
Remove trailing whitespace
2011-08-23 12:39:07 +02:00
Aaron Patterson
bfc432574d
properly escape html to avoid invalid utf8 causing XSS attacks
2011-08-16 15:24:58 -07:00
David Heinemeier Hansson
9482554f31
Added Array#prepend as an alias for Array#unshift and Array#append as an alias for Array#<< [DHH]
2011-08-15 16:56:33 -05:00
Arun Agrawal
83eec4ca4c
Requiring delegate.
2011-08-16 01:36:21 +05:30
Jon Leighton
2e2f3f5a46
Add a test for delegating a method ending in '=' as this is a special case.
2011-08-15 16:07:49 +01:00
Jon Leighton
27da0c5480
Split up the definitions in Module#delegate depending on :allow_nil, and don't use exceptions for flow control in the :allow_nil => true case.
2011-08-15 13:56:04 +01:00
Jon Leighton
63d100ea35
Fix the line number in the backtrace when Module#delegate raises
2011-08-15 13:03:28 +01:00
Jon Leighton
8bba95f293
Just do the method call directly in Module#delegate, if we can (we cannot for method names ending in '='). Two reasons: 1) it's faster, see https://gist.github.com/1089783 and 2) more importantly, delegate should not allow you to accidentally call private or protected methods.
2011-08-15 12:38:38 +01:00
Jon Leighton
6f4b405250
Backport Object#public_send to 1.8 so that we can implement Module#delegate such that non-public methods raise
2011-08-15 12:08:23 +01:00
Aaron Patterson
681bf1fc48
backporting IO#binread for 1.8 users
2011-08-08 19:48:12 -07:00
Santiago Pastorino
6e701e8735
Merge pull request #2393 from bdurand/fix_cache_read_multi
...
Fix ArgumentError in ActiveSupport::Cache::CacheStore.read_multi
2011-08-01 10:58:48 -07:00
Brian Durand
fec4c5ad76
Pass options in ActiveSupport::Cache::CacheStore#read_multi through to the delete_entry call.
2011-08-01 12:05:29 -05:00
Arun Agrawal
ec7457ed2a
Removing extra requires from the test. Already loaded in abstract_unit.
2011-07-31 23:36:21 +05:30
Aaron Patterson
ae1e70cf80
Merge pull request #2353 from bdurand/no_freeze_cache_entries
...
Change ActiveSupport::Cache behavior to not return frozen objects
2011-07-29 16:20:21 -07:00
Brian Durand
a263f37797
Change ActiveSupport::Cache behavior to always return duplicate objects instead of frozen objects.
2011-07-29 17:27:45 -05:00
Brian Cardarella
6ef1079e0e
Reset @dirty to false when slicing an instance of SafeBuffer
2011-07-29 13:10:31 -04:00
Vishnu Atrai
db34a65277
remove unused variables warnings removed
2011-07-26 23:53:54 +05:30
Aaron Patterson
64807b964f
fixing tests on ruby trunk
2011-07-26 11:02:41 -07:00
Aaron Patterson
d4246e5bb3
fixing whitespace errors
2011-07-26 11:00:33 -07:00
Mitesh Jain
2c90568a06
Duplicable test is looking fine now.
2011-07-24 19:43:42 +05:30
Gonzalo Rodriguez
49b0f9e395
Fix ActiveSupport::Cache::FileStore#file_path_key does not work if initialized with Pathname
...
Port from 3-1-stable
2011-07-23 17:57:04 -03:00
Marc-Andre Lafortune
816abecf90
Insure that Enumerable#index_by, group_by, ... return Enumerators
2011-07-23 15:52:37 -04:00
Marc-Andre Lafortune
c785038839
Make Enumerable#many? iterate only over what is necessary
2011-07-23 15:52:37 -04:00
Marc-Andre Lafortune
a96e824c53
Make Enumerable#many? not rely on #size
2011-07-23 15:52:37 -04:00