Jonathan Hefner
414e8dea59
Merge pull request #43334 from federicoaldunate/add-that-raises-exception-message-encryptor
...
Update MessageEncryptor guide to show that an exception is raised [ci-skip]
2021-09-29 12:15:59 -05:00
Federico Aldunate
4860d8534b
Update MessageEncryptor guide to show that an exception is raised
...
swap order
2021-09-29 14:06:58 -03:00
Étienne Barrié
5bf6073614
Revert "Fix ForkTracker on ruby <= 2.5.3"
...
This reverts commit 332a2909d4
.
2021-09-24 13:02:05 +02:00
Étienne Barrié
d63add1039
Don't override Object#fork in Ruby 3.0
...
It's no longer necessary with https://bugs.ruby-lang.org/issues/9573
2021-09-24 13:01:55 +02:00
Rafael Mendonça França
a76344ffc5
Merge PR #42475
2021-09-20 18:03:57 -04:00
Rafael Mendonça França
d177551c30
Preparing for 7.0.0.alpha2 release
2021-09-15 18:22:51 -04:00
Rafael Mendonça França
9b7be48212
Preparing for 7.0.0.alpha1 release
2021-09-15 17:55:08 -04:00
Jean Boussier
c91c266872
Enable `Style/ExplicitBlockArgument` cop
...
This reduce the stack size which is beneficial for
exceptions performance.
See: https://gist.github.com/byroot/cb3bcadcc3701c2518d002fb8d3a4e7a
However the cop is unsafe because it might change the block arity,
so it can run into some false positives.
2021-09-05 17:06:19 +02:00
Jean Boussier
5fbc750840
Get rid of `mattr_accessor` in `ActiveSupport::Dependencies`
...
Since the module isn't included anywhere and is purely static
there iss no point using `mattr_accessor`, which define instance
accessors and other extra overhead.
Regular `attr_accessor` does the job just fine.
2021-09-05 12:42:23 +02:00
Xavier Noria
1d6355f6e1
Move Zeitwerk to railties
...
Active Support should not know about Rails. Once classic has been removed,
AS should get anything it needs from the application as usual.
2021-09-05 03:37:46 +02:00
Xavier Noria
5346dfdf74
Move the default autoloaders inflector to railties
2021-09-04 20:44:39 +02:00
Xavier Noria
e0d77f124d
Formatting
2021-09-04 09:32:04 +02:00
Xavier Noria
d9fc52cc7b
Update the AS CHANGELOG
2021-09-04 09:30:08 +02:00
Xavier Noria
556572ac19
Fixes typo
2021-09-04 07:56:57 +02:00
Xavier Noria
7ce6f45ae3
Revise private docs of AS::Dependencies
2021-09-02 19:41:21 +02:00
Xavier Noria
174ee7bb60
Depends on Zeitwerk 2.5.0.beta3
2021-09-01 15:31:04 +02:00
Jean Boussier
a3cfa4a20d
Merge pull request #43098 from flavorjones/flavorjones-number-to-currency-detect-parse-failures
...
Fix number_to_currency regression in handling "-0.0"
2021-08-26 15:45:13 +02:00
Mike Dalessio
81175fb98a
Fix number_to_currency regression in handling "-0.0"
...
simplifying the method along the way.
This regressed in #42581 and is related to prior work in #39350 and #37865 .
2021-08-25 22:30:12 -04:00
Mike Dalessio
900ce92c9d
Avoid use of exceptions to detect invalid floats
...
Use Kernel::Float(..., exceptions:false) instead of a rescue block in
ActionView::Helpers::NumberHelper and
ActiveSupport::NumberHelper::NumberConverter to slightly improve
performance.
Also remove documentation that incorrectly states
ActiveSupport::NumberHelper supports the `raise:` option.
2021-08-25 21:44:45 -04:00
Nicholas Stuart
aabc27fe15
Move `assert_raise` into behavior classes
2021-08-24 12:06:53 -07:00
Nicholas Stuart
2c15e00a2c
Address PR comments.
2021-08-24 10:09:07 -07:00
Nicholas Stuart
2e097e86d2
Add test case
2021-08-24 09:36:55 -07:00
Nicholas Stuart
c83e690311
Revert the `raise_errors` param and Removed rescue block from `ActiveSupport::Cache::RedisCacheStore#handle_exception`
2021-08-24 09:33:08 -07:00
Nicholas Stuart
22b000bde8
Update CHANGELOG.md
2021-08-23 20:29:18 -07:00
Nicholas Stuart
7f1129277b
init commit
2021-08-23 17:35:00 -07:00
Xavier Noria
fddfaa08af
Move AS::Dependencies.clear to the main file
2021-08-23 17:49:48 +02:00
Xavier Noria
a8fa8b0ef8
Delete AS::Dependencies.verbose=
...
As documented, the public way to trace autoloading activity
is Rails.autoloaders.log!
2021-08-23 10:05:13 +02:00
Xavier Noria
61d7f33f67
Delete AS::Dependencies.autoloaded_constants
2021-08-23 10:05:13 +02:00
Xavier Noria
86a55dbe0f
Delete private constant AS::Dependencies::UNBOUND_METHOD_MODULE_NAME
2021-08-23 10:05:13 +02:00
Xavier Noria
651737f059
AS::Dependencies no longer extends self
...
AS::Dependencies is not meant to be used as a mixin. I guess extend self
made sense time ago.
2021-08-23 10:05:13 +02:00
Xavier Noria
7bbe1f4bce
Delete the classic version of AS::Dependencies.clear
2021-08-23 10:05:08 +02:00
Xavier Noria
08481be86e
Delete the classic version of AS::Dependencies.autoloaded_constants
2021-08-23 09:20:52 +02:00
Xavier Noria
b99b14a1cf
Delete AS::Dependencies.autoloaded?
2021-08-23 09:04:35 +02:00
Xavier Noria
39a7658b61
Deletes spurious spaces
2021-08-23 00:49:18 +02:00
Xavier Noria
340b39ea31
Remove autoloading logic from AS::DescendantsTracker
...
The descendants tracker is a generic tracker that you can use anywhere.
In particular, outside Rails applications.
Should provide API to clear only a subset of classes, but in my view
should know nothing about autoloading. That is a concern of client code.
2021-08-23 00:24:26 +02:00
Xavier Noria
6a2a824e85
Namespace fixture classes in this test
...
This test was defining classes with common names like `Parent` or `Child` in the
top-level namespace. Better to have them below a custom one.
2021-08-22 22:08:28 +02:00
Xavier Noria
fc9a179033
Depends on Zeitwerk 2.5.0.beta2
2021-08-21 01:23:21 +02:00
Xavier Noria
38e82daee8
Delete AS::Dependencies.safe_constantize
2021-08-20 17:51:05 +02:00
Xavier Noria
3e3504bdaa
Delete AS::Dependencies.constantize
2021-08-20 09:47:22 +02:00
Xavier Noria
d4ab55e901
Delete orphan requires in AS::Dependencies
2021-08-19 00:14:06 +02:00
Xavier Noria
c640deef99
Delete AS::Dependencies.explicitly_unloadable_constants
2021-08-18 23:26:29 +02:00
Xavier Noria
fb9a33d602
Delete AS::Dependencies.mechanism
2021-08-18 23:26:25 +02:00
Xavier Noria
0f2d2ba87d
Delete AS::Dependencies.load?
2021-08-18 23:26:20 +02:00
Xavier Noria
ed1571ddc0
Delete AS::Dependencies.autoloadable_module?
2021-08-18 23:26:16 +02:00
Xavier Noria
c1a89b57df
Delete AS::Dependencies.load_once_path?
2021-08-18 23:26:12 +02:00
Xavier Noria
bde4b04323
Delete AS::Dependencies.uninitialized_constant
2021-08-18 23:26:07 +02:00
Xavier Noria
bc2cd69c22
Delete AS::Dependencies::WatchStack
2021-08-18 23:26:03 +02:00
Xavier Noria
dd5d632a6b
Delete AS::Dependencies.constant_watch_stack
2021-08-18 23:25:59 +02:00
Xavier Noria
e5cdd54525
Delete AS::Dependencies.will_autoload?
2021-08-18 23:25:54 +02:00
Xavier Noria
2105d1ed3e
Delete AS::Dependencies.mark_for_unload
2021-08-18 23:25:49 +02:00