From 0f0b40d3b6ff8598624574beab92e4ac87481c1c Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 18 Apr 2010 00:05:09 +0200 Subject: revises the rdoc of String#ord --- activesupport/lib/active_support/core_ext/string/conversions.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ActiveSupport::Multibyte::Chars#ord. def ord self[0] end unless method_defined?(:ord) -- cgit v1.2.3