Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add test for normalizing non-unicode string | Fumiaki MATSUSHIMA | 2018-11-15 | 1 | -0/+10 |
| | | | | Closes #34062 | ||||
* | Use String#truncate_bytes inside Multibyte::Chars#limit | Francesco Rodríguez | 2018-10-20 | 1 | -18/+0 |
| | |||||
* | Deprecate ActiveSupport::Multibyte::Chars.consumes? | Francesco Rodríguez | 2018-10-15 | 1 | -3/+9 |
| | | | | | | 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. | ||||
* | Deprecate Unicode#normalize and Chars#normalize (#34202) | Francesco Rodríguez | 2018-10-12 | 1 | -16/+57 |
| | |||||
* | Use native String#capitalize | Francesco Rodríguez | 2018-10-12 | 1 | -1/+1 |
| | |||||
* | Deprecate Unicode#downcase/upcase/swapcase. | Francesco Rodríguez | 2018-10-12 | 1 | -0/+6 |
| | | | | Use String methods directly instead. | ||||
* | Enable `Performance/UnfreezeString` cop | yuuji.yaginuma | 2018-09-23 | 1 | -12/+12 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Ruby 2.3 or later, `String#+@` is available and `+@` is faster than `dup`. ```ruby # frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "benchmark-ips" end Benchmark.ips do |x| x.report('+@') { +"" } x.report('dup') { "".dup } x.compare! end ``` ``` $ ruby -v benchmark.rb ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] Warming up -------------------------------------- +@ 282.289k i/100ms dup 187.638k i/100ms Calculating ------------------------------------- +@ 6.775M (± 3.6%) i/s - 33.875M in 5.006253s dup 3.320M (± 2.2%) i/s - 16.700M in 5.032125s Comparison: +@: 6775299.3 i/s dup: 3320400.7 i/s - 2.04x slower ``` | ||||
* | Replace `assert !` with `assert_not` | Daniel Colson | 2018-04-19 | 1 | -2/+2 |
| | | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd. | ||||
* | Use assert_predicate and assert_not_predicate | Daniel Colson | 2018-01-25 | 1 | -1/+1 |
| | |||||
* | Use respond_to test helpers | Daniel Colson | 2018-01-25 | 1 | -4/+4 |
| | |||||
* | [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` | Koichi ITO | 2017-07-11 | 1 | -0/+1 |
| | |||||
* | Use frozen-string-literal in ActiveSupport | Kir Shatrov | 2017-07-09 | 1 | -0/+1 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Merge pull request #29540 from kirs/rubocop-frozen-string | Matthew Draper | 2017-07-02 | 1 | -0/+1 |
|\ | | | | | | | Enforce frozen string in Rubocop | ||||
| * | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | | |||||
* | | Make ActiveSupport frozen string literal friendly. | Pat Allan | 2017-06-20 | 1 | -14/+14 |
|/ | | | | | | | The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder: https://github.com/tenderlove/builder/pull/6 Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0. | ||||
* | Add `Style/EmptyLinesAroundMethodBody` in `.rubocop.yml` and remove extra ↵ | Ryuta Kamizono | 2017-02-12 | 1 | -1/+0 |
| | | | | empty lines | ||||
* | Correct spelling | Benjamin Fleischer | 2017-02-05 | 1 | -1/+1 |
| | | | | | | | ``` go get -u github.com/client9/misspell/cmd/misspell misspell -w -error -source=text . ``` | ||||
* | "Use assert_nil if expecting nil. This will fail in minitest 6." | Akira Matsuda | 2016-12-25 | 1 | -8/+8 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -6/+6 |
| | |||||
* | improve error message when include assertions fail | Michael Grosser | 2016-09-16 | 1 | -5/+5 |
| | | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong | ||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 1 | -2/+2 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 1 | -11/+11 |
| | |||||
* | modernizes hash syntax in activesupport | Xavier Noria | 2016-08-06 | 1 | -2/+2 |
| | |||||
* | applies new string literal convention in activesupport/test | Xavier Noria | 2016-08-06 | 1 | -183/+183 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Merge pull request #12877 from aroben/extended-graphemes | Rafael França | 2015-12-31 | 1 | -3/+29 |
|\ | | | | | Support extended grapheme clusters and UAX 29 | ||||
| * | Beef up #grapheme_length tests | Adam Roben | 2013-11-13 | 1 | -3/+29 |
| | | | | | | | | We how have tests for every rule in UAX 29. | ||||
* | | Update #20737 to address feedback | Sean Griffin | 2015-10-20 | 1 | -0/+8 |
| | | | | | | | | | | | | | | Given that this pull request affects a mutable value, we need to test for and document the affects on the receiver in this case. Additionally, this pull request was missing a CHANGELOG entry. | ||||
* | | Fixed slice! behavior: return nil for out-of-bound parameters | Gourav Tiwari | 2015-10-20 | 1 | -0/+4 |
| | | |||||
* | | Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵ | Vipul A M | 2015-02-03 | 1 | -1/+0 |
| | | | | | | | | onwards. | ||||
* | | Pass symbol as an argument instead of a block | Erik Michaels-Ober | 2014-11-29 | 1 | -1/+1 |
| | | |||||
* | | "warning: assigned but unused variable" | Akira Matsuda | 2014-08-19 | 1 | -1/+0 |
| | | |||||
* | | Avoid mutating the constants in a test case | Akira Matsuda | 2014-08-16 | 1 | -3/+1 |
| | | |||||
* | | Avoid polluting String class globally in a test case | Akira Matsuda | 2014-08-16 | 1 | -8/+13 |
| | | |||||
* | | Unused ivar in a test suite | Akira Matsuda | 2014-08-16 | 1 | -1/+0 |
| | | |||||
* | | Prefer assert_raise instead of flunk + rescue to test for exceptions | Carlos Antonio da Silva | 2013-12-19 | 1 | -3/+3 |
|/ | | | | | | Change most tests to make use of assert_raise returning the raised exception rather than relying on a combination of flunk + rescue to check for exception types/messages. | ||||
* | ensure original encoding doesnt change | Francesco Rodriguez | 2012-12-01 | 1 | -0/+3 |
| | |||||
* | Simplify String#mb_chars and stop proxying #class | Steve Klabnik | 2012-11-28 | 1 | -1/+4 |
| | | | | | | | | This behavior mattered under Ruby 1.8, but that doesn't matter now that we don't support it. In addition, we don't want to proxy the #class method. A test was added to prevent against regressions. | ||||
* | Fix class_eval without __FILE__ and __LINE__. | kennyj | 2012-07-18 | 1 | -1/+1 |
| | |||||
* | Use respond_to_missing? for Chars | Marc-Andre Lafortune | 2012-05-05 | 1 | -0/+9 |
| | |||||
* | Added as_json method for multibyte strings | Dmitriy Vorotilin | 2012-02-01 | 1 | -0/+3 |
| | |||||
* | Implement Chars#swapcase. | Norman Clarke | 2012-01-06 | 1 | -2/+13 |
| | |||||
* | use AS::TestCase as the base class | Aaron Patterson | 2012-01-05 | 1 | -3/+3 |
| | |||||
* | Use friendlier method name | Norman Clarke | 2012-01-05 | 1 | -1/+1 |
| | |||||
* | Replace Unicode.u_unpack with String#codepoints | Norman Clarke | 2012-01-05 | 1 | -11/+0 |
| | |||||
* | Just use Ruby's String#[]= | Norman Clarke | 2012-01-05 | 1 | -5/+0 |
| | |||||
* | Merge branch 'refactor-multibyte-chars' of https://github.com/lest/rails ↵ | Norman Clarke | 2012-01-05 | 1 | -1/+1 |
|\ | | | | | | | | | | | | | into multibyte Conflicts: activesupport/lib/active_support/multibyte/chars.rb | ||||
| * | refactor AS::Multibyte::Chars | Sergey Nartimov | 2012-01-05 | 1 | -1/+1 |
| | | |||||
* | | Make return value from bang methods match Ruby docs | Norman Clarke | 2012-01-05 | 1 | -4/+10 |
| | | | | | | | | | | The docs for the String class indicate that methods like `rstrip!` and others should return nil when they do not have an effect on the string. | ||||
* | | Fix incorrect behavior specified in test. | Norman Clarke | 2012-01-05 | 1 | -1/+1 |
|/ | | | | This test was actually specifying the opposite of what it should. |