From 1c907a93001b65cebfb5229dea11ce60289fd14e Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 10 Apr 2001 06:09:00 +0000 Subject: [PATCH] * io.c (opt_i_set): should strdup() inplace_edit string. * eval.c (exec_under): need to push cref too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ eval.c | 2 ++ gc.c | 34 ---------------------------------- io.c | 3 ++- version.h | 8 ++++---- 5 files changed, 16 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4e76a9c31..bfaa1f5c02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Apr 10 02:24:40 2001 Nobuyoshi Nakada + + * io.c (opt_i_set): should strdup() inplace_edit string. + +Mon Apr 9 23:29:54 2001 Yukihiro Matsumoto + + * eval.c (exec_under): need to push cref too. + Mon Apr 9 12:05:44 2001 Yukihiro Matsumoto * file.c (Init_File): should redifine "new" class method. diff --git a/eval.c b/eval.c index 8b5490dbae..11ba04e680 100644 --- a/eval.c +++ b/eval.c @@ -4928,6 +4928,7 @@ exec_under(func, under, args) if (ruby_cbase != under) { ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,under,0,ruby_frame->cbase); } + PUSH_CREF(under); mode = scope_vmode; SCOPE_SET(SCOPE_PUBLIC); @@ -4936,6 +4937,7 @@ exec_under(func, under, args) val = (*func)(args); } POP_TAG(); + POP_CREF(); SCOPE_SET(mode); POP_FRAME(); POP_CLASS(); diff --git a/gc.c b/gc.c index efe9669760..a0e4ce6404 100644 --- a/gc.c +++ b/gc.c @@ -1337,37 +1337,3 @@ Init_GC() rb_gc_unregister_address(&rb_mObSpace); finalizers = rb_ary_new(); } - -#undef xmalloc -#undef xcalloc -#undef xrealloc -#undef xfree - -void* -xmalloc(size) - long size; -{ - return ruby_xmalloc(size); -} - -void* -xcalloc(n,size) - long n,size; -{ - return ruby_xcalloc(n, size); -} - -void* -xrealloc(ptr,size) - void *ptr; - long size; -{ - return ruby_xrealloc(ptr, size); -} - -void -xfree(ptr) - void *ptr; -{ - ruby_xfree(ptr); -} diff --git a/io.c b/io.c index bd1790dacd..6e1c932d5d 100644 --- a/io.c +++ b/io.c @@ -3324,11 +3324,12 @@ static void opt_i_set(val) VALUE val; { + if (ruby_inplace_mode) free(ruby_inplace_mode); if (!RTEST(val)) { ruby_inplace_mode = 0; return; } - ruby_inplace_mode = STR2CSTR(val); + ruby_inplace_mode = strdup(STR2CSTR(val)); } void diff --git a/version.h b/version.h index a2ba2887f6..4b32460ba7 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ -#define RUBY_VERSION "1.6.3" -#define RUBY_RELEASE_DATE "2001-04-09" -#define RUBY_VERSION_CODE 163 -#define RUBY_RELEASE_CODE 20010409 +#define RUBY_VERSION "1.6.4" +#define RUBY_RELEASE_DATE "2001-04-10" +#define RUBY_VERSION_CODE 164 +#define RUBY_RELEASE_CODE 20010410