Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Not A Bug
-
Affects Version/s: JRuby 1.2
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
In other words, I can't create a small program to reproduce it because this happens inside of a larger framework,
and so far I failed to reproduce it using a framework-free sample. ![]()
But the given files show the summary of it:
File A:
GUI::AppManager.register _FILE_, {
:version => '1.0',
:title => 'JEditor'
}
File B:
def AppManager.register filename, conf = nil
p 'Watch out filename:', filename
The output is:
"Watch out filename:"
"/home/dewd/code/apps/jeditor/gui/lib//jeditor_gui/conf.rb"
Which for me doesn't quite match what is expected, that is, the double slash in
"lib//jeditor_gui" screws things for me. For this one case I was able to normalize
it with File.expand_path and it worked. But I fear it could happen elsewhere still.
This same code works great with Ruby itself and only derails with JRuby.
Maybe if _FILE_ knows that it is returning the full path of the file in question
it could be normalized inside JRuby core so it better matched what Ruby provides
in similar situations.
So basically _FILE_ is showing the double-slash in the path if you happen to load that file with the double slash, correct?
So are you saying this behavior is wrong or other File logic is wrong?