diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/access.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/access.rb b/activesupport/lib/active_support/core_ext/string/access.rb index 57385d86d2..bf11d16365 100644 --- a/activesupport/lib/active_support/core_ext/string/access.rb +++ b/activesupport/lib/active_support/core_ext/string/access.rb @@ -5,7 +5,7 @@ class String # Examples: # "hello".at(0) # => "h" # "hello".at(4) # => "o" - # "hello".at(10) # => nil + # "hello".at(10) # => ERROR if < 1.9, nil in 1.9 def at(position) mb_chars[position, 1].to_s end @@ -15,7 +15,7 @@ class String # Examples: # "hello".from(0) # => "hello" # "hello".from(2) # => "llo" - # "hello".from(10) # => nil + # "hello".from(10) # => "" if < 1.9, nil in 1.9 def from(position) mb_chars[position..-1].to_s end |