summaryrefslogtreecommitdiffstats
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
commitfcc7e76943f4f021ff57c5a4faed7630d4388912 (patch)
treecec682023960c6e1bd246e0b5d8ea0c4c8308c71 /string.c
parent6a3e42442f11137b8fac10d50a33c2f97e704740 (diff)
downloadruby-fcc7e76943f4f021ff57c5a4faed7630d4388912.tar.gz
ruby-fcc7e76943f4f021ff57c5a4faed7630d4388912.tar.xz
ruby-fcc7e76943f4f021ff57c5a4faed7630d4388912.zip
* 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: http://svn.ruby-lang.org/repos/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 d51129708..bcd75a229 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);
}
/*