[#1611] set_trace_func/Array#fetch error — "Nathaniel Talbott" <nathaniel@...>

I've reduced the error I reported in ruby-talk:84013 to the following code:

17 messages 2003/10/11

mkmf.rb fix

From: Mathieu Bouchard <matju@...>
Date: 2003-10-06 00:19:57 UTC
List: ruby-core #1583


I was supposed to be getting a Permission Denied message when trying to
rewrite ext/readline/Makefile, but instead I got a message about can't
call close on nil. So here's the fix:



diff -u -r1.151 mkmf.rb
--- mkmf.rb     29 Sep 2003 02:44:49 -0000      1.151
+++ mkmf.rb     6 Oct 2003 00:16:58 -0000
@@ -934,7 +934,7 @@
     end
   end
 ensure
-  mfile.close
+  mfile.close if mfile
 end

 def init_mkmf(config = CONFIG)

________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju


In This Thread

Prev Next