* eval_error.c (error_print): pos and len parameters of rb_str_substr()
are counted by characters, not bytes. use rb_str_subseq() instead. [Bug #10727] [ruby-core:67473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0704c382a8
commit
27c679b832
@ -1,3 +1,9 @@
|
|||||||
|
Sat Jan 10 12:32:44 2015 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval_error.c (error_print): pos and len parameters of rb_str_substr()
|
||||||
|
are counted by characters, not bytes. use rb_str_subseq() instead.
|
||||||
|
[Bug #10727] [ruby-core:67473]
|
||||||
|
|
||||||
Sat Jan 10 10:58:55 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
Sat Jan 10 10:58:55 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||||
|
|
||||||
* complex.c: removed commented-out code.
|
* complex.c: removed commented-out code.
|
||||||
|
@ -169,7 +169,7 @@ error_print(void)
|
|||||||
warn_print(")\n");
|
warn_print(")\n");
|
||||||
}
|
}
|
||||||
if (tail) {
|
if (tail) {
|
||||||
warn_print_str(rb_str_substr(e, tail - einfo, elen - len - 1));
|
warn_print_str(rb_str_subseq(e, tail - einfo, elen - len - 1));
|
||||||
}
|
}
|
||||||
if (tail ? einfo[elen-1] != '\n' : !epath) warn_print2("\n", 1);
|
if (tail ? einfo[elen-1] != '\n' : !epath) warn_print2("\n", 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user