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 | |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | string.c | 5 | ||||
-rw-r--r-- | version.h | 6 |
3 files changed, 8 insertions, 8 deletions
@@ -1,3 +1,8 @@ +Fri Feb 23 10:03:49 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * string.c (rb_str_ord): need not to check string length; ord + returns a codepoint for the first character in the string. + Wed Feb 21 22:29:45 2007 Akinori MUSHA <knu@iDaemons.org> * numeric.c (fix_equal): A bit more optimization. @@ -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); } @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-02-21" +#define RUBY_RELEASE_DATE "2007-02-23" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20070221 +#define RUBY_RELEASE_CODE 20070223 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 21 +#define RUBY_RELEASE_DAY 23 RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_release_date[]; |