Sharang Dashputre
818437c366
Fix bug with parametrize when locale
is passed
...
Also add tests for parametrize and transliterate
2019-03-12 01:48:21 +05:30
Koichi ITO
ac717d65a3
[Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment
2017-07-11 13:12:32 +09:00
Kir Shatrov
72950568dd
Use frozen-string-literal in ActiveSupport
2017-07-09 15:08:29 +03:00
Matthew Draper
87b3e226d6
Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
...
This reverts commit 3420a14590
, reversing
changes made to afb66a5a59
.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e
Enforce frozen string in Rubocop
2017-07-01 02:11:03 +03:00
Kevin McPhillips
f90a08c193
Raise ArgumentError if attempting to transliterate anything that is not a string
2017-01-16 14:40:41 -05:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
...
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
5c315a8fa6
modernizes hash syntax in activesupport
2016-08-06 19:38:33 +02:00
Xavier Noria
a731125f12
applies new string literal convention in activesupport/test
...
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:10:53 +02:00
Vipul A M
6eced6a1fe
Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 onwards.
2015-02-03 20:51:40 +05:30
ankit1910
d433dc5c6c
[ci skip] use proper apostrophe
2014-08-25 22:03:31 +05:30
Akira Matsuda
e837e5a96b
Be sure to restore the default I18n.locale after changed its value in a test
2013-09-10 19:54:49 +02:00
Vijay Dev
ec8ef1e105
Revert "Merge branch 'master' of github.com:rails/docrails"
...
This reverts commit 70d6e16fba
, reversing
changes made to ea4db3bc07
.
Seems to be a code merge done by mistake.
2013-08-17 21:46:39 +05:30
Akira Matsuda
633be2cbbd
Be sure to restore the default I18n.locale after changed its value in a test
2013-07-26 04:21:52 +09:00
Vipul A M
4bd8ccd984
fix repeat of test; remove unused variable by use of each_key
2013-03-18 19:58:02 +05:30
Xavier Noria
447b6a4e67
removes usage of Object#in? from the code base (the method remains defined by Active Support)
...
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in
5ea6b0df9a
we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.
In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
2012-08-06 00:30:02 +02:00
Aaron Patterson
b8d8c50785
use AS::TestCase as the base class
2012-01-05 17:12:46 -08:00
Prem Sichanugrist
733bfa63f5
Remove #among?
from Active Support
...
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.
It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
2011-04-13 20:25:28 +08:00
David Heinemeier Hansson
d1575ae1b9
Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion!
2011-04-12 00:23:07 +02:00
Prem Sichanugrist
a9f3c9da01
Using Object#in? and Object#either? in various places
...
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
Norman Clarke
f0e754e713
Delegate Inflector.transliterate to i18n. [ #4508 state:resolved]
...
Ancillary changes: Moved Chars#normalize into a class method; removed
unused UTF_PAT constant.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-30 16:18:12 +02:00
Norman Clarke
dceef0828a
Improve reliability of Inflector.transliterate. [ #4374 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-12 23:19:39 -07:00