aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-04-18 00:05:09 +0200
committerXavier Noria <fxn@hashref.com>2010-04-18 00:05:53 +0200
commit7f25e2378358fbb09011ad932a6709831a7e59d2 (patch)
tree60006cd487c99359d405b66d3b0b793d0ceb6220 /activesupport
parentea3fa4e7ffbdb771e06545f22f71bc4e7f6a334c (diff)
downloadrails-7f25e2378358fbb09011ad932a6709831a7e59d2.tar.gz
rails-7f25e2378358fbb09011ad932a6709831a7e59d2.tar.bz2
rails-7f25e2378358fbb09011ad932a6709831a7e59d2.zip
revises the rdoc of String#ord
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/string/conversions.rb6
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)