* string.c (rb_str_splice): should place index wrapping after
possible modification. [ruby-dev:24940] * eval.c (error_print): nicer traceback at interrupt. [ruby-core:03774] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fc4a280c75
commit
688c69b1f7
10
ChangeLog
10
ChangeLog
@ -11,6 +11,11 @@ Sat Nov 20 23:56:54 2004 Dave Thomas <dave@pragprog.com>
|
|||||||
* lib/rdoc/options.rb (Options::parse): Force --inline-source if
|
* lib/rdoc/options.rb (Options::parse): Force --inline-source if
|
||||||
--one-file option given
|
--one-file option given
|
||||||
|
|
||||||
|
Sat Nov 20 23:55:19 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* string.c (rb_str_splice): should place index wrapping after
|
||||||
|
possible modification. [ruby-dev:24940]
|
||||||
|
|
||||||
Sat Nov 20 23:25:12 2004 Minero Aoki <aamine@loveruby.net>
|
Sat Nov 20 23:25:12 2004 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
* io.c (rb_io_getline): f.gets("") did not work. [ruby-core:03771]
|
* io.c (rb_io_getline): f.gets("") did not work. [ruby-core:03771]
|
||||||
@ -40,6 +45,11 @@ Sat Nov 20 01:45:04 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
|||||||
* test/xmlrpc/test_webrick_server.rb : move `requrie "webrick/https"'
|
* test/xmlrpc/test_webrick_server.rb : move `requrie "webrick/https"'
|
||||||
into #setup_http_server mohtod to avoid soap test errors.
|
into #setup_http_server mohtod to avoid soap test errors.
|
||||||
|
|
||||||
|
Sat Nov 20 01:37:34 2004 Johan Holmberg <holmberg@iar.se>
|
||||||
|
|
||||||
|
* eval.c (error_print): nicer traceback at interrupt.
|
||||||
|
[ruby-core:03774]
|
||||||
|
|
||||||
Sat Nov 20 00:07:16 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Sat Nov 20 00:07:16 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (str_gsub): internal buffer should not be listed by
|
* string.c (str_gsub): internal buffer should not be listed by
|
||||||
|
1
eval.c
1
eval.c
@ -1148,6 +1148,7 @@ error_print()
|
|||||||
if (elen == 0) {
|
if (elen == 0) {
|
||||||
warn_print(": ");
|
warn_print(": ");
|
||||||
warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
|
warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
|
||||||
|
warn_print("\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char *tail = 0;
|
char *tail = 0;
|
||||||
|
6
string.c
6
string.c
@ -1628,6 +1628,10 @@ rb_str_splice(str, beg, len, val)
|
|||||||
VALUE val;
|
VALUE val;
|
||||||
{
|
{
|
||||||
if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);
|
if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);
|
||||||
|
|
||||||
|
StringValue(val);
|
||||||
|
rb_str_modify(str);
|
||||||
|
|
||||||
if (RSTRING(str)->len < beg) {
|
if (RSTRING(str)->len < beg) {
|
||||||
out_of_range:
|
out_of_range:
|
||||||
rb_raise(rb_eIndexError, "index %ld out of string", beg);
|
rb_raise(rb_eIndexError, "index %ld out of string", beg);
|
||||||
@ -1642,8 +1646,6 @@ rb_str_splice(str, beg, len, val)
|
|||||||
len = RSTRING(str)->len - beg;
|
len = RSTRING(str)->len - beg;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringValue(val);
|
|
||||||
rb_str_modify(str);
|
|
||||||
if (len < RSTRING(val)->len) {
|
if (len < RSTRING(val)->len) {
|
||||||
/* expand string */
|
/* expand string */
|
||||||
RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(val)->len - len + 1);
|
RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(val)->len - len + 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user