| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
[egilburg]
|
| |
|
| |
|
|\
| |
| |
| | |
Fix a backtracking problem in String#truncate_words
|
|/
|
|
| |
Fixes #19070.
|
|
|
|
|
|
|
| |
This caused a performance regression since we were decided to do the nil
check in run time not in the load time.
See https://github.com/rails/rails/pull/15187#issuecomment-71760058
|
|
|
|
| |
onwards.
|
|
|
|
|
|
| |
Staying true to Ruby convention, we now return the value of the yielded
block from `File.atomic_write {...}`. This mimics the behavior of MRI's
`File.open {...}`.
|
|
|
|
|
|
|
| |
tests
- Fixed the wrong use of with_indifferent_access on hash in the test which failed for isolated tests
- Renamed to appropriately specify what the test does
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi there,
i have an app without english as available locale. So i got an error when we try to inspect something like 1.day. This is done automatically when we use the dalli cache.
I would like to change the :en to ::I18n.default_locale to be sure that this is always constant and is an available locale.
Tests are all green with this change.
Calculating -------------------------------------
:locale => :en 2.024k i/100ms
:locale => ::I18n.default_locale 2.236k i/100ms
-------------------------------------------------
:locale => :en 25.758k (±26.3%) i/s - 117.392k
:locale => ::I18n.default_locale 26.311k (±18.1%) i/s - 127.452k
|
| |
|
|
|
|
| |
Date, Time, and DateTime
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and DateTime
`#on_weekend?` returns true if the receiving date/time falls on a Saturday or
Sunday.
`#next_weekday` returns a new date/time representing the next day that does
not fall on a Saturday or Sunday.
`#prev_weekday` returns a new date/time representing the previous day that
does not fall on a Saturday or Sunday.
|
| |
|
|
|
|
|
| |
bebugger doesn't work with Ruby 2.2 so we don't need to support it
anymore
|
|
|
|
|
| |
Now that Rails requires Ruby >= 2.0, there is no need to check whether
`BigDecimal` exists or not.
|
| |
|
|
|
|
| |
`silence_stderr`, `silence_stream`, `capture` and `quietly`.
|
| |
|
|
|
|
|
| |
`MissingSourceFile` was just an alias to `LoadError` and was not
being raised inside the framework.
|
|\
| |
| |
| |
| |
| |
| | |
replace use of MissingSourceFile with LoadError
Conflicts:
activesupport/test/core_ext/load_error_test.rb
|
| | |
|
| |
| |
| |
| | |
They are already present on Ruby 2.2
|
|\ \
| | |
| | | |
Rely on NameError#name instead of its error message
|
| | |
| | |
| | |
| | |
| | |
| | | |
Rubinius' error messages don't call `#inspect` on the concerned object
while the assertion is here to address a wrong inspection on MRI with
time zones so let's keep this test for now on Rubinius.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Delegate comparison operator to value
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
expression`
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
pattern removal
added example for string#remove and test case for remove of multiple occurence of pattern
removed extra whitespaces
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Removed the unused require of proxy_object
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
- Reference : https://github.com/rails/rails/pull/17493#issuecomment-61739359
- Duration stopped inheriting from ProxyObject in https://github.com/rails/rails/pull/16574
|
|/ / /
| | |
| | |
| | |
| | | |
- Russian time was changed to UTC+3 from UTC+4 recently. This broke the
string_to_ext test.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Make `String#remove` and `String#remove!` accept multiple arguments
Conflicts:
activesupport/CHANGELOG.md
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | | |
Based on commit 5e51bdda.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* The assertions in AS::Duration don't actually assert.
* The assertion in Railtie will pass even when `eager_load_namespaces`
doesn't include `AppTemplate::Application` if `Rails.application` is
truthy.
For more details, see here:
* https://github.com/rails/rails/pull/16998
* https://github.com/rails/rails/pull/17000
|
| | |
| | |
| | |
| | | |
Fixes #16956.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added method `#eql?` to `ActiveSupport::Duration`, in addition to `#==`.
Conflicts:
activesupport/CHANGELOG.md
activesupport/lib/active_support/duration.rb
activesupport/test/core_ext/duration_test.rb
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, the following returns `false`, contrary to expectation:
1.minute.eql?(1.minute)
Adding method `#eql?` will make this behave like expected. Method `#eql?` is
just a bit stricter than `#==`, as it checks whether the argument is also a
uration. Their parts may be different though.
1.minute.eql?(60.seconds) # => true
1.minute.eql?(60) # => false
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Ruby 2.2 knows this, and no longer matches it with [[:space:]], so it's
not a good candidate for testing String#squish.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Closes #16392.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
https://github.com/rails/rails/commit/98b46bf5e201307cae56ee14bf41363a539779c5
did not properly handled out-of-range `:usec`s.
Passing a `:usec` that's out of range now throws an `ArgumentError` as it
should.
Fixes #16759.
|
| | | | |
|