- 15 5月, 2019 1 次提交
-
- 27 4月, 2019 1 次提交
-
-
由 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]
-
- 25 4月, 2019 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 19 4月, 2019 2 次提交
-
-
由 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.
-
由 r7kamura 提交于
-
- 17 4月, 2019 1 次提交
-
-
由 Mauri Mustonen 提交于
-
- 09 4月, 2019 1 次提交
-
-
由 Xavier Noria 提交于
-
- 07 4月, 2019 1 次提交
-
-
由 Xavier Noria 提交于
-
- 31 3月, 2019 2 次提交
-
-
由 Ryuta Kamizono 提交于
* use backticks instead of `+` * and more (e.g. missed replacing `Array#excluding` and `Enumerable#excluding` in b89a3e7e)
-
由 Ryuta Kamizono 提交于
* add leading `#` before `=>` since hash rocket is valid Ruby code * add backticks * remove trailing spaces * and more
-
- 30 3月, 2019 1 次提交
-
-
由 Xavier Noria 提交于
-
- 28 3月, 2019 1 次提交
-
-
由 Owen Stephens 提交于
Before: ```ruby (1..10).cover?(1...11) => false ``` After: ```ruby (1..10).cover?(1...11) => true ``` See https://git.io/fjTtz for the commit against Ruby core that added support for Range arguments, with similar handling of this case.
-
- 26 3月, 2019 1 次提交
-
-
由 Edgars Beigarts 提交于
It allows anonymous subclasses to be garbage collected.
-
- 23 3月, 2019 1 次提交
-
-
由 Ali Ibrahim 提交于
-
- 22 3月, 2019 1 次提交
-
-
由 Ali Ibrahim 提交于
with change to ActiveSupport::Notifications::Instrumenter#instrument
-
- 19 3月, 2019 1 次提交
-
-
由 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.
-
- 16 3月, 2019 1 次提交
-
-
由 Xavier Noria 提交于
-
- 13 3月, 2019 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 12 3月, 2019 1 次提交
-
-
由 Sharang Dashputre 提交于
-
- 11 3月, 2019 1 次提交
-
-
由 eileencodes 提交于
* Update RAILS_VERSION * Bundle * rake update_versions * rake changelog:header
-
- 06 3月, 2019 1 次提交
-
-
由 David Heinemeier Hansson 提交于
-
- 26 2月, 2019 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 14 2月, 2019 1 次提交
-
-
由 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.
-
- 12 2月, 2019 1 次提交
-
-
由 zvkemp 提交于
-
- 09 2月, 2019 1 次提交
-
-
由 Guillermo Iguaran 提交于
-
- 31 1月, 2019 1 次提交
-
-
由 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.
-
- 30 1月, 2019 2 次提交
-
-
由 Rosa Gutierrez 提交于
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`.
-
由 Stefan Schüßler 提交于
-
- 19 1月, 2019 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 18 1月, 2019 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
- 10 1月, 2019 1 次提交
-
-
由 Keenan Brock 提交于
### 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 ```
-
- 27 12月, 2018 1 次提交
-
-
由 Gannon McGibbon 提交于
fetch_multi(*names) now returns its results in the same order as the `*names` requested, rather than returning cache hits followed by cache misses.
-
- 20 12月, 2018 1 次提交
-
-
由 Kasper Timm Hansen 提交于
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.
-
- 30 11月, 2018 1 次提交
-
-
由 Mark J. Titorenko 提交于
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]
-
- 02 11月, 2018 1 次提交
-
-
由 Nick Weiland 提交于
Fixes #34359 Prior to 5.2.0 (2cad8d71), 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.
-
- 29 10月, 2018 1 次提交
-
-
由 Xavier Noria 提交于
References #34253.
-
- 19 10月, 2018 1 次提交
-
-
由 Francesco Rodríguez 提交于
in favor of `array.flatten.pack("U*")` and `string.scan(/\X/).map(&:codepoints)`, respectively.
-
- 16 10月, 2018 1 次提交
-
-
由 Francesco Rodríguez 提交于
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.
-
- 13 10月, 2018 1 次提交
-
-
由 Edouard CHIN 提交于
- 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
-