git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-12-26 08:32:35 +00:00
parent a5dcc4437e
commit 8369164408
3 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,11 @@ Tue Dec 26 16:53:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (proc_new): ditto. * eval.c (proc_new): ditto.
Tue Dec 26 15:45:35 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_inspect): should treat multibyte chracters
properly.
Mon Dec 25 17:49:08 2000 K.Kosako <kosako@sofnec.co.jp> Mon Dec 25 17:49:08 2000 K.Kosako <kosako@sofnec.co.jp>
* string.c (rb_str_replace_m): unexpected string share happens if * string.c (rb_str_replace_m): unexpected string share happens if

2
io.c
View File

@ -2156,7 +2156,7 @@ rb_f_p(argc, argv)
for (i=0; i<argc; i++) { for (i=0; i<argc; i++) {
rb_p(argv[i]); rb_p(argv[i]);
} }
if (TYPE(rb_defout) != T_FILE) { if (TYPE(rb_defout) == T_FILE) {
rb_io_flush(rb_defout); rb_io_flush(rb_defout);
} }
return Qnil; return Qnil;

View File

@ -1494,8 +1494,8 @@ rb_str_inspect(str)
char c = *p++; char c = *p++;
if (ismbchar(c) && p < pend) { if (ismbchar(c) && p < pend) {
int len = mbclen(c); int len = mbclen(c);
rb_str_cat(result, p, len); rb_str_cat(result, p - 1, len);
p += len; p += len - 1;
} }
else if (c == '"'|| c == '\\') { else if (c == '"'|| c == '\\') {
s[0] = '\\'; s[1] = c; s[0] = '\\'; s[1] = c;