aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/string_ext_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-15 02:28:32 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-15 02:28:32 +0000
commit6d5ee8dab37f7cb4a15ab7a3c4369b105055570e (patch)
treecd2557a03e5c89f03b10984465b05e0c54af6e1f /activesupport/test/core_ext/string_ext_test.rb
parentaa4ad404c6aa4feccc69b8d7222bcfd1b1903215 (diff)
downloadrails-6d5ee8dab37f7cb4a15ab7a3c4369b105055570e.tar.gz
rails-6d5ee8dab37f7cb4a15ab7a3c4369b105055570e.tar.bz2
rails-6d5ee8dab37f7cb4a15ab7a3c4369b105055570e.zip
Ruby 1.9 compat: 'a'.ord == 'a'[0]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/core_ext/string_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index cec6772272..427e7dfc57 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -78,6 +78,11 @@ class StringInflectionsTest < Test::Unit::TestCase
end
end
+ def test_ord
+ assert_equal 97, 'a'.ord
+ assert_equal 97, 'abc'.ord
+ end
+
def test_string_to_time
assert_equal Time.utc(2005, 2, 27, 23, 50), "2005-02-27 23:50".to_time
assert_equal Time.local(2005, 2, 27, 23, 50), "2005-02-27 23:50".to_time(:local)