[前][次][番号順一覧][スレッド一覧]

ruby-changes:41747

From: nobu <ko1@a...>
Date: Sun, 14 Feb 2016 17:31:56 +0900 (JST)
Subject: [ruby-changes:41747] nobu:r53821 (trunk): mkmf.rb: Do not modify caller strings

nobu	2016-02-14 17:32:15 +0900 (Sun, 14 Feb 2016)

  New Revision: 53821

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53821

  Log:
    mkmf.rb: Do not modify caller strings
    
    * lib/mkmf.rb (with_{cpp,c,ld}flags): copy caller strings not to
      be modified, in append_{cpp,c,ld}flags respectively.
      [Fix GH-1246]

  Modified files:
    trunk/ChangeLog
    trunk/lib/mkmf.rb
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 53820)
+++ lib/mkmf.rb	(revision 53821)
@@ -603,7 +603,7 @@ MSG https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L603
 
   def with_cppflags(flags)
     cppflags = $CPPFLAGS
-    $CPPFLAGS = flags
+    $CPPFLAGS = flags.dup
     ret = yield
   ensure
     $CPPFLAGS = cppflags unless ret
@@ -625,7 +625,7 @@ MSG https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L625
 
   def with_cflags(flags)
     cflags = $CFLAGS
-    $CFLAGS = flags
+    $CFLAGS = flags.dup
     ret = yield
   ensure
     $CFLAGS = cflags unless ret
@@ -647,7 +647,7 @@ MSG https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L647
 
   def with_ldflags(flags)
     ldflags = $LDFLAGS
-    $LDFLAGS = flags
+    $LDFLAGS = flags.dup
     ret = yield
   ensure
     $LDFLAGS = ldflags unless ret
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53820)
+++ ChangeLog	(revision 53821)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Feb 14 17:31:50 2016  Lars Kanis  <lars@g...>
+
+	* lib/mkmf.rb (with_{cpp,c,ld}flags): copy caller strings not to
+	  be modified, in append_{cpp,c,ld}flags respectively.
+	  [Fix GH-1246]
+
 Sun Feb 14 16:18:57 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* eval.c (setup_exception): set the cause only if it is explicitly

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]