From cce2ea0056083d0e4c100f299a82f18368b1e4f5 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Mar 29 2016 19:42:36 +0000 Subject: Fix empty Variables view when debugging Ruby script --- diff --git a/eclipse-dltk.spec b/eclipse-dltk.spec index 08156c7..58dd0e3 100644 --- a/eclipse-dltk.spec +++ b/eclipse-dltk.spec @@ -2,7 +2,7 @@ Name: eclipse-dltk Version: 5.4.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Dynamic Languages Toolkit (DLTK) Eclipse plug-in License: EPL and (CPL or GPLv2+ or LGPLv2+) and Ruby URL: http://www.eclipse.org/dltk/ @@ -19,6 +19,9 @@ Patch0: eclipse-bug-323736.patch # Fix documentation view colours Patch1: eclipse-bug-489902.patch +# Fix empty variable views +Patch2: eclipse-ruby-basicdebugger.patch + BuildArch: noarch BuildRequires: eclipse-license >= 1.0.1 @@ -109,6 +112,7 @@ Tests for Eclipse Dynamic Languages Toolkit (DLTK). pushd org.eclipse.dltk.ruby %patch0 -p1 +%patch2 -p1 popd pushd org.eclipse.dltk.core %patch1 -p1 @@ -179,6 +183,9 @@ done %files tests -f .mfiles-tests %changelog +* Tue Mar 29 2016 Mat Booth - 5.4.0-4 +- Fix empty Variables view when debugging Ruby script + * Mon Mar 21 2016 Alexander Kurtakov 5.4.0-3 - Add Rs for better experience - Test:Unit run and stdlib docs. diff --git a/eclipse-ruby-basicdebugger.patch b/eclipse-ruby-basicdebugger.patch new file mode 100644 index 0000000..4872133 --- /dev/null +++ b/eclipse-ruby-basicdebugger.patch @@ -0,0 +1,46 @@ +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 +--- + .../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 + +