1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/core_ext
Kasper Timm Hansen efa2299ac3
Remove tough to grasp -1 + 1 = 0 from String#to
In case a negative position is provided that exceeds the size of the
string, we're relying on -1 returned from max to get 0 length by + 1
and let [] with a 0 length returning "" for us.

E.g. "hello".to(-7), where -7 + 5 size = -2. That's
lower than -1, so we use -1 instead and + 1 would turn it into 0.

Instead allow outer bounds access and always return "".
2019-07-26 22:08:34 +02:00
..
array Fix including/excluding flattening 2019-03-06 13:34:04 -03:00
class [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
digest [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
hash Delete uneeded blank file 2019-02-08 12:30:45 -05:00
kernel [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
module Remove deprecated Module#reachable? method 2019-01-17 16:08:34 -05:00
object Implement UnboundMethod#duplicable? 2019-07-12 10:47:23 +02:00
bigdecimal_test.rb Suppress warning: BigDecimal.new is deprecated 2017-12-15 01:19:57 +00:00
class_test.rb Change refute to assert_not 2018-01-25 23:32:58 -05:00
date_and_time_behavior.rb Delete DateAndTime method definition in rails that is compatible with ruby definition 2019-06-16 18:11:39 +09:00
date_and_time_compatibility_test.rb Add Style/RedundantFreeze to remove redudant .freeze 2018-09-29 07:18:44 +00:00
date_ext_test.rb Delete DateAndTime method definition in rails that is compatible with ruby definition 2019-06-16 18:11:39 +09:00
date_time_ext_test.rb Fix issue where duration where always rounded up to a second: 2018-10-12 13:27:13 -04:00
duration_test.rb Add tests for duration multiplication and division 2018-06-25 13:48:35 +01:00
enumerable_test.rb Add compact_blank shortcut for reject(&:blank?) 2019-06-05 18:18:17 +10:00
file_test.rb Ensure correct permission when tmpdir is the same as dirname. 2018-10-02 16:40:39 +02:00
hash_ext_test.rb Fix rubocop violations 2019-02-09 10:50:58 +09:00
integer_ext_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
kernel_test.rb [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
load_error_test.rb Fixes warning: mismatched indentations at 'rescue' with 'def' at 15. 2018-12-21 12:28:33 +01:00
marshal_test.rb [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
module_test.rb Omit marshal_dump & _dump from delegate_missing_to 2019-07-17 23:22:39 -04:00
name_error_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
numeric_ext_test.rb Deprecate "active_support/core_ext/numeric/inquiry" 2018-03-02 23:32:10 -08:00
range_ext_test.rb Fix bug in Range comparisons when comparing to excluded-end Range 2019-03-28 00:57:05 +00:00
regexp_ext_test.rb Remove test_match_p since Rails 6 requires Ruby 2.4.1 or newer 2018-05-07 04:19:24 +09:00
secure_random_test.rb Tweak test name 2018-12-30 12:01:55 -05:00
string_ext_test.rb Remove tough to grasp -1 + 1 = 0 from String#to 2019-07-26 22:08:34 +02:00
time_ext_test.rb Delete DateAndTime method definition in rails that is compatible with ruby definition 2019-06-16 18:11:39 +09:00
time_with_zone_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
uri_ext_test.rb URI.unescape handles mixed Unicode/escaped input 2018-03-07 12:58:02 +11:00