From ecf157699dfdeaf813ca8a017ad53209cbfa8350 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 17 Aug 2004 08:31:02 +0000 Subject: * io.c (rb_io_reopen): should clear allocated OpenFile. pointed out by Guy Decoux. [ruby-core:03288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- error.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'error.c') diff --git a/error.c b/error.c index dcba4f4163..c67fce9d34 100644 --- a/error.c +++ b/error.c @@ -353,10 +353,7 @@ exc_initialize(argc, argv, exc) { VALUE arg; - if (rb_scan_args(argc, argv, "01", &arg) == 1) { - VALUE mesg = arg; - StringValue(mesg); /* ensure mesg can be converted to String */ - } + rb_scan_args(argc, argv, "01", &arg); rb_iv_set(exc, "mesg", arg); rb_iv_set(exc, "bt", Qnil); -- cgit v1.2.3