aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-17 03:26:20 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-17 03:26:20 +0530
commitdba196cb7f8d34b93f6872e4a43737bb52019065 (patch)
tree97a2f784a2ec2bfae4f960af56a9280dad6f7774 /activesupport/lib/active_support/core_ext/string
parent6e3bee6cf1f0d2684152292db0a8b757249824fd (diff)
downloadrails-dba196cb7f8d34b93f6872e4a43737bb52019065.tar.gz
rails-dba196cb7f8d34b93f6872e4a43737bb52019065.tar.bz2
rails-dba196cb7f8d34b93f6872e4a43737bb52019065.zip
Merge docrails
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string')
-rw-r--r--activesupport/lib/active_support/core_ext/string/access.rb4
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 182b3e745d..64bc8f6cea 100644
--- a/activesupport/lib/active_support/core_ext/string/access.rb
+++ b/activesupport/lib/active_support/core_ext/string/access.rb
@@ -7,7 +7,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
@@ -17,7 +17,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