summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-07 08:49:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-07 08:49:34 +0000
commit0fbcc455bd4601ed39919379058fc63f44923cfb (patch)
treecec682023960c6e1bd246e0b5d8ea0c4c8308c71 /string.c
parent9dc29ddfd78c9bfb68161d1da922089ab859cbae (diff)
* string.c (rb_str_ord): extract lower byte. fixed: [ruby-dev:28980]
* lib/jcode.rb (String#succ!): fix for 1.9. fixed: [ruby-dev:28979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index d511297089..bcd75a229a 100644
--- a/string.c
+++ b/string.c
@@ -4070,7 +4070,7 @@ rb_str_ord(VALUE s)
"expacted a characer, but string of size %d given",
RSTRING(s)->len);
}
- c = RSTRING(s)->ptr[0];
+ c = RSTRING(s)->ptr[0] & 0xff;
return INT2NUM(c);
}
/*