DebugClients/Ruby/DebugClientBaseModule.rb

changeset 2438
61bfcff921d8
parent 2302
f29e9405c851
child 3160
209a07d7e401
diff -r f75dbdd22959 -r 61bfcff921d8 DebugClients/Ruby/DebugClientBaseModule.rb
--- a/DebugClients/Ruby/DebugClientBaseModule.rb	Thu Feb 28 16:57:45 2013 +0100
+++ b/DebugClients/Ruby/DebugClientBaseModule.rb	Sat Mar 02 15:05:29 2013 +0100
@@ -7,11 +7,6 @@
 File implementing a debug client base module.
 =end
 
-if RUBY_VERSION < "1.9"
-    $KCODE = 'UTF8'
-    require 'jcode'
-end
-
 require 'socket'
 
 require 'DebugQuit'
@@ -199,7 +194,7 @@
         
         # Remove any newline
         if line[-1] == "\n"
-            line = line[1...-1]
+            line = line[0...-1]
         end
         
 ##        STDOUT << line << "\n"          ## debug
@@ -209,7 +204,7 @@
         if eoc and eoc >= 0 and line[0,1] == ">"
             # Get the command part and any argument
             cmd = line[0..eoc]
-            arg = line[eoc+1...-1]
+            arg = line[eoc+1..-1]
             
             case cmd
             when RequestOK
@@ -304,6 +299,9 @@
                 end
                 @running = fn
                 command = "$0 = '%s'; require '%s'" % [fn, fn]
+                RubyVM::InstructionSequence.compile_option = {
+                    trace_instruction: true
+                }
                 set_trace_func proc { |event, file, line, id, binding_, klass, *rest|
                     DEBUGGER__.context.trace_func(event, file, line, id, binding_, klass)
                 }

eric ide

mercurial