[Ruby-debug-commits] [850] trunk/bin/rdebug: $0 is frozen in Ruby 1.8.7

nobody at rubyforge.org nobody at rubyforge.org
Wed Jul 9 15:25:16 EDT 2008


Revision: 850
Author:   kent
Date:     2008-07-09 15:25:16 -0400 (Wed, 09 Jul 2008)

Log Message:
-----------
$0 is frozen in Ruby 1.8.7

Modified Paths:
--------------
    trunk/bin/rdebug

Modified: trunk/bin/rdebug
===================================================================
--- trunk/bin/rdebug	2008-07-09 00:43:17 UTC (rev 849)
+++ trunk/bin/rdebug	2008-07-09 19:25:16 UTC (rev 850)
@@ -38,7 +38,11 @@
          else
            Debugger::PROG_SCRIPT
          end
-    $0[0..-1] = d0
+    if $0.frozen?
+      $0 = d0
+    else
+      $0[0..-1] = d0
+    end
   end
   bt = Debugger.debug_load(Debugger::PROG_SCRIPT, options.stop, false)
   if bt




More information about the Ruby-debug-commits mailing list