Created
April 30, 2011 00:20
-
-
Save jfirebaugh/949273 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 059997e739d20007bd47fa20d871fadf65bea3da Mon Sep 17 00:00:00 2001 | |
From: John Firebaugh <[email protected]> | |
Date: Fri, 29 Apr 2011 17:16:54 -0700 | |
Subject: [PATCH] Fix #27254, compare full canonical path of breakpoint positions. | |
--- | |
src/org/jruby/debug/DebugEventHook.java | 9 +++------ | |
1 files changed, 3 insertions(+), 6 deletions(-) | |
diff --git a/src/org/jruby/debug/DebugEventHook.java b/src/org/jruby/debug/DebugEventHook.java | |
index 45723bb..423bc97 100644 | |
--- a/src/org/jruby/debug/DebugEventHook.java | |
+++ b/src/org/jruby/debug/DebugEventHook.java | |
@@ -440,12 +440,9 @@ final class DebugEventHook extends EventHook { | |
return false; | |
} | |
String source = debugBreakpoint.getSource().toString(); | |
- String sourceName = new File(source).getName(); | |
- String fileName = new File(file).getName(); | |
- if (sourceName.equals(fileName)) { | |
- return true; | |
- } | |
- return false; | |
+ String sourcePath = new File(source).getCanonicalPath(); | |
+ String filePath = new File(file).getCanonicalPath(); | |
+ return sourcePath.equals(filePath); | |
} | |
private IRubyObject checkBreakpointsByMethod(DebugContext debugContext, | |
-- | |
1.7.4.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment