ruby-changes:37120
From: usa <ko1@a...>
Date: Sat, 10 Jan 2015 12:35:23 +0900 (JST)
Subject: [ruby-changes:37120] usa:r49201 (trunk): * eval_error.c (error_print): pos and len parameters of rb_str_substr()
usa 2015-01-10 12:35:11 +0900 (Sat, 10 Jan 2015) New Revision: 49201 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49201 Log: * 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] Modified files: trunk/ChangeLog trunk/eval_error.c Index: ChangeLog =================================================================== --- ChangeLog (revision 49200) +++ ChangeLog (revision 49201) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Jan 10 12:32:44 2015 NAKAMURA Usaku <usa@r...> + + * 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@g...> * complex.c: removed commented-out code. Index: eval_error.c =================================================================== --- eval_error.c (revision 49200) +++ eval_error.c (revision 49201) @@ -169,7 +169,7 @@ error_print(void) https://github.com/ruby/ruby/blob/trunk/eval_error.c#L169 warn_print(")\n"); } 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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/