| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
In #10634 the behavior of Time#advance was changed to maintain a
proleptic gregorian calendar for dates before calendar reform. However
it didn't full address dates a long time before calendar reform and
they gradually drift away from the proleptic calendar the further you
go back in time. Fix this by always converting the date to gregorian
before calling advance which sets the reform date to -infinity.
|
| |
|
|\
| |
| |
| | |
v6.0.0.beta3 release
|
| |
| |
| |
| |
| |
| |
| | |
* Update RAILS_VERSION
* Bundle
* rake update_versions
* rake changelog:header
|
| | |
|
|\ \
| | |
| | |
| | | |
Add changelog entry for transliterate/parameterize accepting `locale` [ci skip]
|
|/ / |
|
|/
|
|
| |
Enumerable#excluding
|
| |
|
|
|
|
|
|
|
|
| |
There is too much to say about it for a CHANGELOG entry, and linking to
the original PR could mislead if there are later changes as already
happened with the gem dependency, so just a one-liner.
For final we'll up to date documentation.
|
|\
| |
| | |
use ProxyPattern to match for ActiveSupport::Notifications fanout/unsubscribe
|
| | |
|
|/ |
|
|\
| |
| |
| | |
Support before_reset callback in CurrentAttributes
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is useful when we need to do some work associated to `Current.reset`
but that work depends on the values of the current attributes themselves.
This cannot be done in the supported `resets` callback because when the
block is executed, CurrentAttributes's instance has already been reset.
For symmetry, `after_reset` is defined as alias of `resets`.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
ActiveSupport overrides `` Kernel#` `` so that it would not raise
`Errno::ENOENT` but return `nil` instead (due to the last statement
`STDERR.puts` returning nil) if a given command were not found.
Because of this, you cannot safely say somthing like
`` `command`.chomp `` when ActiveSupport is loaded.
It turns out that this is an outdated monkey patch for Windows
platforms to emulate Unix behavior on an ancient version of Ruby, and
it should be removed by now.
|
|\
| |
| |
| | |
Add HashWithIndifferentAccess#assoc
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
### Summary
There was an issues when using `safe_constantize` on a string that has
the wrong case.
File `em.rb` defines `EM`.
`"Em".safe_constantize` causes a little confusion with the autoloader.
The autoloader finds file "em.rb",
expecting it to define `Em`, but `Em` is not defined.
The autoloader raises a `LoadError`, which is good,
But `safe_constantize` is defined to return `nil` when a class is not found.
### Before
```
"Em".safe_constantize
LoadError: Unable to autoload constant Em, \
expected rails/activesupport/test/autoloading_fixtures/em.rb to define it
```
### After
```
"Em".safe_constantize
# => nil
```
|
|\
| |
| | |
Preserve key order of #fetch_multi
|
| |
| |
| |
| |
| |
| | |
fetch_multi(*names) now returns its results in the same order
as the `*names` requested, rather than returning cache hits
followed by cache misses.
|
|/
|
|
|
|
|
|
|
|
| |
Generally followed the pattern for https://github.com/rails/rails/pull/32034
* Removes needless CI configs for 2.4
* Targets 2.5 in rubocop
* Updates existing CHANGELOG entries for fewer merge conflicts
* Removes Hash#slice extension as that's inlined on Ruby 2.5.
* Removes the need for send on define_method in MethodCallAssertions.
|
|
|
|
|
|
|
|
|
| |
If the same block is included multiple times, we no longer raise an exception
or overwrite the included block instance variable.
Fixes #14802.
[Mark J. Titorenko + Vlad Bokov]
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #34359
Prior to 5.2.0 (2cad8d7), HashWithIndifferentAccess#to_options acted as
an alias to HashWithIndifferentAccess#symbolize_keys. Now, #to_options
returns an instance of HashWithIndifferentAccess while #symbolize_keys
returns and instance of Hash.
This pr makes it so HashWithIndifferentAccess#to_options acts as an
alias for HashWithIndifferentAccess#symbolize_keys once again.
|
|
|
|
| |
References #34253.
|
|
|
|
| |
in favor of `array.flatten.pack("U*")` and `string.scan(/\X/).map(&:codepoints)`, respectively.
|
|
|
|
|
|
| |
In favor of String#is_utf8?.
I think this method was made for internal use only, and its usage was removed here: https://github.com/rails/rails/pull/8261/files#diff-ce956ebe93786930e40f18db1da5fd46L39.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Adding a Float as a duration to a datetime would result in the Float
being rounded. Doing something like would have no effect because the
0.45 seconds would be rounded to 0 second.
```ruby
time = DateTime.parse("2018-1-1")
time += 0.45.seconds
```
This behavior was intentionally added a very long time ago, the
reason was because Ruby 1.8 was using `Integer#gcd` in the
constructor of Rational which didn't accept a float value.
That's no longer the case and doing `Rational(0.45, 86400)` would
now perfectly work fine.
- Fixes #34008
|
| |
|
|
|
|
| |
Use String methods directly instead.
|
|
|
|
| |
ActiveSupport::ParameterFilter
|
|\
| |
| |
| | |
Prefix Module#parent, Module#parents, and Module#parent_name with module
|
| | |
|
|/
|
|
|
|
|
|
| |
- I found this weird that the LoggerSilence wasn't using the
`ActiveSupport` namespace (AFAIK all other classes have it).
This PR deprecate the use of `LoggerSilence` for
`ActiveSupport::LoggerSilence` instead.
|
|
|
|
|
|
| |
integers
[Gannon McGibbon + Eric Turner]
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Handle more unsafe String methods
* Fix codeclimate issue
* Revert stylistic change
[Janosch Müller + Rafael Mendonça França]
|
|\
| |
| |
| | |
TaggedLogging to return a new logger instance
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixing code block rendering, indentation, backticks, etc.
|
| |
| |
| |
| | |
Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The method removes and returns the elements for which the block returns a true value.
If no block is given, an Enumerator is returned instead.
```
numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
odd_numbers = numbers.extract! { |number| number.odd? } # => [1, 3, 5, 7, 9]
numbers # => [0, 2, 4, 6, 8]
```
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
We always add new entries on the top of changelog file.
This commit moves the entry added in 47018a82 up in order to
preserve the chronology.
Follows up 3e2629eb7fae33cd521bf1c265d1bbe8ed04c59e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* test case for fetch cache miss with skip_nil
* abondon nil cache if skip_nil specified
* ensure not cache key for skip nil
* add document with skip_nil for Store#fetch
* add a new change log entry for #25437
|