Basic Ruby (>1.9) support restored. 5_4_x

Wed, 06 Aug 2014 18:54:06 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Wed, 06 Aug 2014 18:54:06 +0200
branch
5_4_x
changeset 3749
2f6d6904fbc0
parent 3738
42554311cde8
child 3754
57e71efb769f

Basic Ruby (>1.9) support restored.
(grafted from 3882b6c32713438e0d1e080b22530901c5c92b66)

DebugClients/Ruby/DebugClientBaseModule.rb file | annotate | diff | comparison | revisions
--- a/DebugClients/Ruby/DebugClientBaseModule.rb	Wed Jul 30 19:51:31 2014 +0200
+++ b/DebugClients/Ruby/DebugClientBaseModule.rb	Wed Aug 06 18:54:06 2014 +0200
@@ -893,6 +893,11 @@
             end
             next if matched
             
+            if key.to_s == '$KCODE' or key.to_s == '$=' or key.to_s == '$-K'
+                varlist << [key.to_s, "NilClass", "nil"]
+                next
+            end
+        
             begin
                 if access
                     if key.to_s == key
@@ -903,7 +908,7 @@
                     k = "#{access}[%s]" % key
                     obj = eval(k, binding_)
                 else
-                    obj = eval(key, binding_)
+                    obj = eval(key.to_s, binding_)
                 end
             rescue NameError
                 next
@@ -933,7 +938,7 @@
                     oval = "%d" % obj.length()
                 end
             end
-            varlist << [key, otype, oval]
+            varlist << [key.to_s, otype, oval]
         end
         return varlist
     end

eric ide

mercurial