[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>

Okay. I've got Ruby compiling. I'm attempting to get everything in

17 messages 2006/01/05
[#7058] Re: More on VC++ 2005 — nobuyoshi nakada <nobuyoshi.nakada@...> 2006/01/06

Hi,

[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)

Hi,

22 messages 2006/01/10
[#7097] Re: mathn: ugly warnings — Daniel Berger <Daniel.Berger@...> 2006/01/10

Hadmut Danisch wrote:

[#7098] Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/10

Daniel Berger wrote:

[#7118] Re: Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/12

*Dean Wampler *<deanwampler gmail.com> writes:

[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>

Hello,

23 messages 2006/01/28
[#7228] Re: Question about massive API changes — Caleb Tennis <caleb@...> 2006/01/28

>

[ ruby-Bugs-3344 ] RDoc.usage doesn't parse caller correctly on windows

From: noreply@...
Date: 2006-01-27 19:38:48 UTC
List: ruby-core #7223
Bugs item #3344, was opened at 2006-01-27 14:26
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3344&group_id=426

Category: Standard Library
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Brent Northam (bnortham)
Assigned to: Nobody (None)
Summary: RDoc.usage doesn't parse caller correctly on windows

Initial Comment:
In using rdoc/usage to output usage information for a commandline utility on Windows I came across this.

In RDoc.usage_no_exit, this code intends to parse out the filename of the calling script with:

main_program_file, = caller[-1].split(/:/,2)
comment = File.open(main_program_file) do |file|
     find_comment(file)
end

The output for main_program_file on Windows is always simply the drive letter, since 2 colons are present in caller[-1].  My hack workaround, which is I'm sure 100% inapropriate as a real fix since I'm new to ruby was:

drive,main_program_file, = caller[-1].split(/:/,2)
    comment = File.open(drive + ":" + main_program_file) do |file|
      find_comment(file)
    end

How are platform-specific issues like this handled?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3344&group_id=426

In This Thread

Prev Next