1. 24 5月, 2017 14 次提交
  2. 23 5月, 2017 2 次提交
  3. 22 5月, 2017 12 次提交
  4. 21 5月, 2017 10 次提交
  5. 20 5月, 2017 2 次提交
    • A
      Merge pull request #29156 from kamipo/make_valid_directions_to_set · ffa693d2
      Andrew White 提交于
      Make `VALID_DIRECTIONS` to `Set`
      ffa693d2
    • A
      Fix implicit calculations with scalars and durations · 28938dd6
      Andrew White 提交于
      Previously calculations where the scalar is first would be converted
      to a duration of seconds but this causes issues with dates being
      converted to times, e.g:
      
          Time.zone = "Beijing"           # => Asia/Shanghai
          date = Date.civil(2017, 5, 20)  # => Mon, 20 May 2017
          2 * 1.day                       # => 172800 seconds
          date + 2 * 1.day                # => Mon, 22 May 2017 00:00:00 CST +08:00
      
      Now the `ActiveSupport::Duration::Scalar` calculation methods will try
      to maintain the part structure of the duration where possible, e.g:
      
          Time.zone = "Beijing"           # => Asia/Shanghai
          date = Date.civil(2017, 5, 20)  # => Mon, 20 May 2017
          2 * 1.day                       # => 2 days
          date + 2 * 1.day                # => Mon, 22 May 2017
      
      Fixes #29160, #28970.
      28938dd6