- 21 2月, 2017 1 次提交
-
-
由 Kasper Timm Hansen 提交于
Pointed out by @matthewd that the HWIA subclass changes the AS scoped class and top-level HWIA hierarchies out from under existing classes. This reverts commit 71da3909, reversing changes made to 41c33bd4.
-
- 20 2月, 2017 1 次提交
-
-
由 Robin Dupret 提交于
This constant was kept for the sake of backward compatibility; it is still available under `ActiveSupport::HashWithIndifferentAccess`. Furthermore, since Ruby 2.5 (https://bugs.ruby-lang.org/issues/11547) won't support top level constant lookup, people would have to update their code anyway.
-
- 08 2月, 2017 1 次提交
-
-
由 yuuji.yaginuma 提交于
deprecate `halt_callback_chains_on_return_false` instead of `halt_and_display_warning_on_return_false` `halt_and_display_warning_on_return_false` is not a public API and application is using `halt_callback_chains_on_return_false`. https://github.com/rails/rails/blob/5-0-stable/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt#L29 https://github.com/rails/rails/blob/5-0-stable/activesupport/lib/active_support.rb#L86..L88 Therefore, deprecate messages should be issued for `halt_callback_chains_on_return_false` instead of `halt_and_display_warning_on_return_false`.
-
- 07 2月, 2017 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
- 04 2月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
Deprecate passing string to `:if` and `:unless` conditional options on `set_callback` and `skip_callback`
-
由 Ryuta Kamizono 提交于
And raise `ArgumentError` when passing string to define callback.
-
- 28 1月, 2017 1 次提交
-
-
由 Fumiaki MATSUSHIMA 提交于
9.0.0 was released on June 21, 2016 http://blog.unicode.org/2016/06/announcing-unicode-standard-version-90.html http://www.unicode.org/versions/Unicode9.0.0/ There are some changes about grapheme cluster in Unicode 9.0.0: http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundary_Rules ------------ I noticed that `unpack_graphemes` returns [Other] when the argument is Other ÷ Prepend (it must be [Other, Prepend]). But in [Unicode 8.0.0's Prepend has no characters](http://www.unicode.org/reports/tr29/tr29-27.html#Prepend) so we don't have to backport following patch: ```diff should_break = + if pos == eoc + true ```
-
- 17 1月, 2017 1 次提交
-
-
由 Kevin McPhillips 提交于
-
- 15 1月, 2017 2 次提交
-
-
由 Akira Matsuda 提交于
in case String or any other ancestor class' respond_to_missing? was defined.
-
由 Akira Matsuda 提交于
in case Array or any other ancestor class' respond_to_missing? was defined.
-
- 10 1月, 2017 1 次提交
-
-
由 Andrey Novikov 提交于
ActiveSupport::Duration.parse('P3Y') == 3.years # It should be true Duration parsing made independent from any moment of time: Fixed length in seconds is assigned to each duration part during parsing. Changed duration of months and years in seconds to more accurate and logical: 1. The value of 365.2425 days in Gregorian year is more accurate as it accounts for every 400th non-leap year. 2. Month's length is bound to year's duration, which makes sensible comparisons like `12.months == 1.year` to be `true` and nonsensical ones like `30.days == 1.month` to be `false`. Calculations on times and dates with durations shouldn't be affected as duration's numeric value isn't used in calculations, only parts are used. Methods on `Numeric` like `2.days` now use these predefined durations to avoid duplicating of duration constants through the codebase and eliminate creation of intermediate durations.
-
- 22 12月, 2016 1 次提交
-
-
由 utilum 提交于
See [this test](https://gist.github.com/utilum/78918f1b64f8b61ee732cb266db7c43a).
-
- 13 12月, 2016 1 次提交
-
-
由 yuuji.yaginuma 提交于
`NilClass`, `FalseClass`, `TrueClass`, `Symbol` and `Numeric` can dup with Ruby 2.4+. Ref: https://bugs.ruby-lang.org/issues/12979
-
- 15 11月, 2016 2 次提交
-
-
由 yuuji.yaginuma 提交于
-
由 Rafael Mendonça França 提交于
This reverts commit bad3a120, reversing changes made to 23843174. Reason: Adding a new option in the API for something that can be done with a `#presence` check could do.
-
- 14 11月, 2016 7 次提交
-
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
由 Andrew White 提交于
-
- 01 11月, 2016 1 次提交
-
-
由 Andrew White 提交于
Previously `ActiveSupport::Duration.parse` used `Time.current` and `Time#advance` to calculate the number of seconds in the duration from an arbitrary collection of parts. However as `advance` tries to be consistent across DST boundaries this meant that either the duration was shorter or longer depending on the time of year. This was fixed by using an absolute reference point in UTC which isn't subject to DST transitions. An arbitrary date of Jan 1st, 2000 was chosen for no other reason that it seemed appropriate. Additionally, duration parsing should now be marginally faster as we are no longer creating instances of `ActiveSupport::TimeWithZone` every time we parse a duration string. Fixes #26941.
-
- 23 10月, 2016 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
- Ruby 2.4 has added Hash#compact and Hash#compact! so we can use it now. - Reference: https://bugs.ruby-lang.org/issues/11818 and https://bugs.ruby-lang.org/issues/12863.
-
- 21 10月, 2016 1 次提交
-
-
由 denisovlev 提交于
-
- 20 10月, 2016 1 次提交
-
-
由 Josua Schmid 提交于
`copy_time_to` is a helper function for date and time calculations. It's being used by `prev_week`, `next_week` and `prev_weekday` to keep the time fraction when jumping around between days. Previously the nanoseconds part was lost during the operation. This lead to problems in practice if you were using the `end_of_day` calculation. Resulting in the time fraction of `end_of_day` not being the same as next week's `end_of_day`. With this fix `copy_time_to` doesn't forget the `nsec` digits.
-
- 03 10月, 2016 1 次提交
-
-
由 Andrew White 提交于
Turns out trying to cache on localtime with arguments is too hard so we'll do it on DateAndTime::Compatibility#to_time instead. This reverts commit 9ce2d1b1, reversing changes made to 53ede1af.
-
- 01 10月, 2016 1 次提交
-
-
由 Thomas Balthazar 提交于
Previously memoization in `localtime` wasn't taking the `utc_offset` parameter into account when returning a cached value. It now caches the computed value depending on the `utc_offset` parameter, e.g: Time.zone = "US/Eastern" t = Time.zone.local(2016,5,2,11) # => Mon, 02 May 2016 11:00:00 EDT -04:00 t.localtime(-7200) # => 2016-05-02 13:00:00 -0200 t.localtime(-3600) # => 2016-05-02 14:00:00 -0100
-
- 24 9月, 2016 1 次提交
-
-
由 Thomas Balthazar 提交于
Previously calls to `in` were being sent to the non-DST aware method `Time#since` via `method_missing`. It is now aliased to the DST aware `ActiveSupport::TimeWithZone#+` which handles transitions across DST boundaries, e.g: Time.zone = "US/Eastern" t = Time.zone.local(2016,11,6,1) # => Sun, 06 Nov 2016 01:00:00 EDT -05:00 t.in(1.hour) # => Sun, 06 Nov 2016 01:00:00 EST -05:00
-
- 10 8月, 2016 1 次提交
-
-
由 Vipul A M 提交于
-
- 04 8月, 2016 1 次提交
-
-
由 willnet 提交于
The current implementation of `thread_mattr_accessor` set variable sharing superclass with subclass. So the method doesn't work as documented. Precondition class Account thread_mattr_accessor :user end class Customer < Account end Account.user = "DHH" Account.user #=> "DHH" Customer.user = "Rafael" Customer.user # => "Rafael" Documented behavior Account.user # => "DHH" Actual behavior Account.user # => "Rafael" Current implementation set variable statically likes `Thread[:attr_Account_user]`, and customer also use it. Make variable name dynamic to use own thread-local variable.
-
- 03 8月, 2016 1 次提交
-
-
由 Andrew White 提交于
Since 434df001 week durations are no longer converted to days. This means we need to add :weeks to the parts that ActiveSupport::TimeWithZone will consider being of variable duration to take account of DST transitions. Fixes #26039.
-
- 30 7月, 2016 1 次提交
-
-
由 David Heinemeier Hansson 提交于
-
- 22 7月, 2016 4 次提交
-
-
由 Xavier Noria 提交于
-
由 Jon McCartie 提交于
-
由 Xavier Noria 提交于
See the rationale in the documentation included in this patch. We are going to gradually introduce this predicate in the code base.
-
由 Bart de Water 提交于
AEAD modes like `aes-256-gcm` provide both confidentiality and data authenticity, eliminating the need to use MessageVerifier to check if the encrypted data has been tampered with. Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
-
- 17 7月, 2016 1 次提交
-
-
由 Genadi Samokovarov 提交于
Those are assertions that I really do miss from the standard `ActiveSupport::TestCase`. Think of those as a more general version of `assert_difference` and `assert_no_difference` (those can be implemented by assert_changes, should this change be accepted). Why do we need those? They are useful when you want to check a side-effect of an operation. `assert_difference` do cover a really common case, but we `assert_changes` gives us more control. Having a global error flag? You can test it easily with `assert_changes`. In fact, you can be really specific about the initial state and the terminal one. ```ruby error = Error.new(:bad) assert_changes -> { Error.current }, from: nil, to: error do expected_bad_operation end ``` `assert_changes` follows `assert_difference` and a string can be given for evaluation as well. ```ruby error = Error.new(:bad) assert_changes 'Error.current', from: nil, to: error do expected_bad_operation end ``` Check out the test cases if you wanna see more examples.
🍻
-
- 14 7月, 2016 1 次提交
-
-
由 oss92 提交于
-