diff options
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/access.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/secure_compare_rotator.rb | 1 |
3 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/access.rb b/activesupport/lib/active_support/core_ext/string/access.rb index eff31e5493..1a0b10b4f6 100644 --- a/activesupport/lib/active_support/core_ext/string/access.rb +++ b/activesupport/lib/active_support/core_ext/string/access.rb @@ -62,7 +62,7 @@ class String # str.from(1).to(-2) # => "ell" def to(position) position += size if position < 0 - self[0, position + 1].to_s + self[0, position + 1] || +"" end # Returns the first character. If a limit is supplied, returns a substring diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 923d6ad228..6d71a67a46 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -793,7 +793,6 @@ module ActiveSupport #:nodoc: end private - # Returns the original name of a class or module even if `name` has been # overridden. def real_mod_name(mod) diff --git a/activesupport/lib/active_support/secure_compare_rotator.rb b/activesupport/lib/active_support/secure_compare_rotator.rb index 97110d41f7..269703c34a 100644 --- a/activesupport/lib/active_support/secure_compare_rotator.rb +++ b/activesupport/lib/active_support/secure_compare_rotator.rb @@ -44,7 +44,6 @@ module ActiveSupport end private - def build_rotation(previous_value, _options) self.class.new(previous_value) end |