From 0631971d56be96c2f17966a8abf78162076983e9 Mon Sep 17 00:00:00 2001
From: Alexander Kurtakov
Date: Fri, 25 Mar 2016 19:03:00 +0200
Subject: Ensure BasicDebugger works for newer Ruby versions.
Sending non String to Kernel.eval doesn't work so ensure it is converted
beforehand.
See-also: https://bugzilla.redhat.com/show_bug.cgi?id=1319761
Change-Id: I7dfbf2e2f4b7064d15e860d479c860c4c1ef8102
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
---
.../debugger/basic/BasicContext.rb | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/plugins/org.eclipse.dltk.ruby.basicdebugger/debugger/basic/BasicContext.rb b/plugins/org.eclipse.dltk.ruby.basicdebugger/debugger/basic/BasicContext.rb
index f4dde95..3e5bb1d 100644
--- a/plugins/org.eclipse.dltk.ruby.basicdebugger/debugger/basic/BasicContext.rb
+++ b/plugins/org.eclipse.dltk.ruby.basicdebugger/debugger/basic/BasicContext.rb
@@ -1,3 +1,12 @@
+###############################################################################
+# Copyright (c) 2005, 2016 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+###############################################################################
+
require 'monitor'
require 'common/Logger'
require 'debugger/AbstractContext'
@@ -95,7 +104,7 @@ module XoredDebugger
end
binding = frame[ :binding ]
info = frame[ :info ]
- Kernel.eval(text, binding, info.file, info.line)
+ Kernel.eval(text.to_s, binding, info.file, info.line)
end
# Stack depth
--
cgit v0.11.2-4-g4a35