aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRAHUL CHAUDHARI <rahul100885@gmail.com>2011-10-11 17:17:20 +0530
committerRAHUL CHAUDHARI <rahul100885@gmail.com>2011-10-11 17:17:20 +0530
commit1f62c6d09f44d080a508e18ec2c44c0adb61b76e (patch)
tree6b8545361797cd692733f5c2c7e395a160637c58 /railties
parent419d4c09dfcc5cbd898ce52d779603c6a29ac3bc (diff)
downloadrails-1f62c6d09f44d080a508e18ec2c44c0adb61b76e.tar.gz
rails-1f62c6d09f44d080a508e18ec2c44c0adb61b76e.tar.bz2
rails-1f62c6d09f44d080a508e18ec2c44c0adb61b76e.zip
Fixed typos in active_support_core_extensions.textile
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/active_support_core_extensions.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index addf5f78be..ecc25c4f1c 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -1760,7 +1760,7 @@ h4(#string-conversions). Conversions
h5. +ord+
-Ruby 1.9 defines +ord+ to be the codepoint of the first character of the receiver. Active Support backports +ord+ for single-byte encondings like ASCII or ISO-8859-1 in Ruby 1.8:
+Ruby 1.9 defines +ord+ to be the codepoint of the first character of the receiver. Active Support backports +ord+ for single-byte encodings like ASCII or ISO-8859-1 in Ruby 1.8:
<ruby>
"a".ord # => 97
@@ -1774,7 +1774,7 @@ In Ruby 1.8 +ord+ doesn't work in general in UTF8 strings, use the multibyte sup
"à".mb_chars.ord # => 224, in UTF8
</ruby>
-Note that the 224 is different in both examples. In ISO-8859-1 "à" is represented as a single byte, 224. Its single-character representattion in UTF8 has two bytes, namely 195 and 160, but its Unicode codepoint is 224. If we call +ord+ on the UTF8 string "à" the return value will be 195 in Ruby 1.8. That is not an error, because UTF8 is unsupported, the call itself would be bogus.
+Note that the 224 is different in both examples. In ISO-8859-1 "à" is represented as a single byte, 224. Its single-character representation in UTF8 has two bytes, namely 195 and 160, but its Unicode codepoint is 224. If we call +ord+ on the UTF8 string "à" the return value will be 195 in Ruby 1.8. That is not an error, because UTF8 is unsupported, the call itself would be bogus.
INFO: +ord+ is equivalent to +getbyte(0)+.