1. 05 11月, 2019 1 次提交
  2. 01 11月, 2019 1 次提交
  3. 10 10月, 2019 1 次提交
  4. 21 9月, 2019 2 次提交
  5. 09 9月, 2019 1 次提交
  6. 05 9月, 2019 1 次提交
  7. 17 8月, 2019 1 次提交
  8. 28 7月, 2019 1 次提交
    • X
      Improves compatibility of require_dependency in zeitwerk mode [Closes #36774] · c701e0b8
      Xavier Noria 提交于
      Applications are not supposed to use require_dependency in their own
      code if running in zeitwerk mode, and require_dependency was initially
      aliased to require with that use case in mind.
      
      However, there are situations in which you cannot control the mode and
      need to be compatible with both. There, you might need require_dependency
      in case you are being executed in classic mode. Think about engines that
      want to support both modes in their parent applications, for example.
      
      Furthermore, Rails itself loads helpers using require_dependency.
      
      Therefore, we need better compatibility.
      c701e0b8
  9. 25 7月, 2019 1 次提交
  10. 23 7月, 2019 2 次提交
    • R
      Preparing for 6.0.0.rc2 release · 4f78062a
      Rafael Mendonça França 提交于
      4f78062a
    • A
      Omit marshal_dump & _dump from delegate_missing_to · 056414eb
      Aaron Lipman 提交于
      Exclude missing marshal_dump and _dump methods from being delegated to
      an object's delegation target via the delegate_missing_to extension.
      This avoids unintentionally adding instance variables to an object
      during marshallization, should the delegation target be a method which
      would otherwise add them.
      
      In current versions of Ruby, a bug exists in the way objects are
      marshalled, allowing for instance variables to be added or removed
      during marshallization (see https://bugs.ruby-lang.org/issues/15968).
      This results in a corrupted serialized byte stream, causing an object's
      instance variables to "leak" into subsequent serialized objects during
      demarshallization.
      
      In Rails, this behavior may be triggered when marshalling an object that
      uses the delegate_missing_to extension, if the delegation target is a
      method which adds or removes instance variables to an object being
      marshalled - when calling Marshal.dump(object), Ruby's built in behavior
      will check whether the object responds to :marshal_dump or :_dump, which
      in turn triggers the delegation target method in the
      responds_to_missing? function defined in
      activesupport/lib/active_support/core_ext/module/delegation.rb
      
      While future versions of Ruby will resolve this bug by raising a
      RuntimeError, the underlying cause of this error may not be readily
      apparent when encountered by Rails developers. By excluding marshal_dump
      and _dump from being delegated to an object's target, this commit
      eliminates a potential cause of unexpected behavior and/or
      RuntimeErrors.
      
      Fixes #36522
      056414eb
  11. 15 5月, 2019 1 次提交
  12. 27 4月, 2019 1 次提交
    • J
      Frozen truncate (#36109) · 95da7fa5
      Jordan Thomas 提交于
      * Add test asserting truncate returns unfrozen string
      
      * Ensure strings returned from truncate are not frozen
      
      This fixes an issue where strings too short to be truncated were
      returned unfrozen, where as long-enough strings were returned
      frozen. Now retuned strings will not be frozen whether or not
      the string returned was shortened.
      
      * Update changelog w/ new truncate behavior description
      
      [Jordan Thomas + Rafael Mendonça França]
      95da7fa5
  13. 25 4月, 2019 1 次提交
  14. 19 4月, 2019 2 次提交
    • G
      Introduce Actionable Errors · 45f1c7a3
      Genadi Samokovarov 提交于
      Actionable errors let's you dispatch actions from Rails' error pages. This
      can help you save time if you have a clear action for the resolution of
      common development errors.
      
      The de-facto example are pending migrations. Every time pending migrations
      are found, a middleware raises an error. With actionable errors, you can
      run the migrations right from the error page. Other examples include Rails
      plugins that need to run a rake task to setup themselves. They can now
      raise actionable errors to run the setup straight from the error pages.
      
      Here is how to define an actionable error:
      
      ```ruby
      class PendingMigrationError < MigrationError #:nodoc:
        include ActiveSupport::ActionableError
      
        action "Run pending migrations" do
          ActiveRecord::Tasks::DatabaseTasks.migrate
        end
      end
      ```
      
      To make an error actionable, include the `ActiveSupport::ActionableError`
      module and invoke the `action` class macro to define the action. An action
      needs a name and a procedure to execute. The name is shown as the name of a
      button on the error pages. Once clicked, it will invoke the given
      procedure.
      45f1c7a3
    • R
      9dd254c2
  15. 17 4月, 2019 1 次提交
  16. 09 4月, 2019 1 次提交
  17. 07 4月, 2019 1 次提交
  18. 31 3月, 2019 2 次提交
  19. 30 3月, 2019 1 次提交
  20. 28 3月, 2019 1 次提交
  21. 26 3月, 2019 1 次提交
  22. 23 3月, 2019 1 次提交
  23. 22 3月, 2019 1 次提交
  24. 19 3月, 2019 1 次提交
    • A
      Fix Time#advance to work with dates before 1001-03-07 · 58ac3f21
      Andrew White 提交于
      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.
      58ac3f21
  25. 16 3月, 2019 1 次提交
  26. 13 3月, 2019 1 次提交
  27. 12 3月, 2019 1 次提交
  28. 11 3月, 2019 1 次提交
    • E
      Prep release · 7c87fd56
      eileencodes 提交于
      * Update RAILS_VERSION
      * Bundle
      * rake update_versions
      * rake changelog:header
      7c87fd56
  29. 06 3月, 2019 1 次提交
  30. 26 2月, 2019 1 次提交
  31. 14 2月, 2019 1 次提交
    • X
      Register new autoloading in AS CHANGELOG [ci skip] · e53430fa
      Xavier Noria 提交于
      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.
      e53430fa
  32. 12 2月, 2019 1 次提交
  33. 09 2月, 2019 1 次提交
  34. 31 1月, 2019 1 次提交
    • A
      Remove the Kernel#` override that turns ENOENT into nil · 545b6e58
      Akinori MUSHA 提交于
      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.
      545b6e58
  35. 30 1月, 2019 2 次提交