diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-23 01:21:49 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-23 01:21:49 +0000 |
commit | 0c882f4c9d8115d5292c85aacc4860e8946661fb (patch) | |
tree | 3c211a650fce15a03d596a5eba23754b10a34081 /string.c | |
parent | 4563573a6b762eab0acf96427d9d3b6f1d0c702f (diff) | |
download | ruby-0c882f4c9d8115d5292c85aacc4860e8946661fb.tar.gz |
* string.c (rb_str_ord): need not to check string length; ord
returns a codepoint for the first character in the string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -4249,11 +4249,6 @@ rb_str_ord(VALUE s) { int c; - if (RSTRING_LEN(s) != 1) { - rb_raise(rb_eTypeError, - "expected a character, but string of size %ld given", - RSTRING_LEN(s)); - } c = RSTRING_PTR(s)[0] & 0xff; return INT2NUM(c); } |