summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-10 03:35:11 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-10 03:35:11 +0000
commit27c679b832c4600af81415c80741cb2619df5e08 (patch)
treec6365711e0d39a444cb85e5b0e9031fcbff283d8 /eval_error.c
parent0704c382a88c71cbfd188d1cd1698a52cabcd846 (diff)
* 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
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval_error.c b/eval_error.c
index 12cfe36..405d738 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -169,7 +169,7 @@ error_print(void)
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);
}