Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Created April 30, 2011 00:20
Show Gist options
  • Save jfirebaugh/949273 to your computer and use it in GitHub Desktop.
Save jfirebaugh/949273 to your computer and use it in GitHub Desktop.
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