diff options
author | Xavier Noria <fxn@hashref.com> | 2010-04-18 00:05:09 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-04-19 05:04:18 -0700 |
commit | 0f0b40d3b6ff8598624574beab92e4ac87481c1c (patch) | |
tree | 64d3da2644dc80160cb534085a5d6a2345142681 /activesupport/lib/active_support/core_ext/string | |
parent | 9428473f9de014e993152fe08277047db0f21848 (diff) | |
download | rails-0f0b40d3b6ff8598624574beab92e4ac87481c1c.tar.gz rails-0f0b40d3b6ff8598624574beab92e4ac87481c1c.tar.bz2 rails-0f0b40d3b6ff8598624574beab92e4ac87481c1c.zip |
revises the rdoc of String#ord
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/conversions.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb index 52946f9037..d70f5d7241 100644 --- a/activesupport/lib/active_support/core_ext/string/conversions.rb +++ b/activesupport/lib/active_support/core_ext/string/conversions.rb @@ -3,7 +3,11 @@ require 'active_support/core_ext/time/publicize_conversion_methods' require 'active_support/core_ext/time/calculations' class String - # 'a'.ord == 'a'[0] for Ruby 1.9 forward compatibility. + # Returns the ASCII code of the first character of the string, assuming it belongs to ASCII. + # + # This method is defined for Ruby 1.9 forward compatibility on ASCII characters. + # + # See also <tt>ActiveSupport::Multibyte::Chars#ord</tt>. def ord self[0] end unless method_defined?(:ord) |